QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#706859 | #9521. Giving Directions in Harbin | vanthoci# | WA | 11ms | 10584kb | Python3 | 429b | 2024-11-03 13:43:21 | 2024-11-03 13:43:21 |
Judging History
answer
d = 'NESW'
def dir(a, b):
a = d.find(a)
b = d.find(b)
return (a - b + 4) % 4
T = int(input())
for _ in range(T):
ans = []
ind = 'N'
m = int(input())
for i in range(m):
x, y = input().split()
z = dir(ind, x)
for j in range(z): ans.append(['L'])
ans.append(['Z', y])
ind = x
print(len(ans), 'N')
for a in ans:
print(*a)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 11ms
memory: 10584kb
input:
1 2 S 2 E 1
output:
5 N L L Z 2 L Z 1
result:
wrong answer Should start with `Z` (test case 1)