QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#726665 | #5680. You You See What? | Nika# | WA | 15ms | 10448kb | Python3 | 454b | 2024-11-09 05:14:56 | 2024-11-09 05:14:57 |
Judging History
answer
def same(p1, p2):
p2 = [p2[1], p2[0]]
# print(p1, p2)
return p1[0].lower() == p2[0].lower() and p1[1].lower() == p2[1].lower()
s = input().split("!")
nodes = []
edges = []
nodes.append(s[0])
for t in s[1]:
newedge = [nodes[-1], t]
if (nodes[-1] == t): continue
# print(newedge)
if len(edges) > 0 and same(edges[-1], newedge):
edges.pop()
nodes.pop()
else:
edges.append(newedge)
nodes.append(t)
print('!'.join(nodes))
詳細信息
Test #1:
score: 0
Wrong Answer
time: 15ms
memory: 10448kb
input:
texasam!rice!baylor!csdept!baylor!rice!dev!bresearch!bpoucher
output:
texasam!r!i!c!e
result:
wrong answer 1st lines differ - expected: 'texasam!rice!dev!bresearch!bpoucher', found: 'texasam!r!i!c!e'