Submission #1494443


Source Code Expand

n,l,t=map(int,input().split())
a,cs=[0]*n,0
for i in range(n):
	x,y=map(int,input().split())
	x+=(t if y==1 else -t)
	cs=(cs+x//l)%n
	x%=l
	if x<0:
		x+=l
		cs-=1
	a[i]=x
a.sort()
print('\n'.join([str(a[(i+cs+n)%n]) for i in range(n)]))

Submission Info

Submission Time
Task C - Ants on a Circle
User fts2001
Language C++14 (GCC 5.4.1)
Score 0
Code Size 248 Byte
Status CE

Compile Error

./Main.cpp:1:1: error: ‘n’ does not name a type
 n,l,t=map(int,input().split())
 ^