QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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)
詳細信息
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)