QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#209008 | #5680. You You See What? | legendarysas | WA | 10ms | 8008kb | Python3 | 425b | 2023-10-10 02:08:59 | 2023-10-10 02:08:59 |
Judging History
answer
import sys
input = sys.stdin.readline
if __name__ == "__main__":
bangs = input().split("!")
skips = {}
for i in range(len(bangs)):
skips[bangs[i].lower()] = i
final = []
i = 0
while i < len(bangs):
final.append(bangs[i])
if skips[bangs[i].lower()] > i:
i = skips[bangs[i].lower()]
i += 1
print("!".join(final))
# print(skips)
# print(bangs)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 10ms
memory: 7916kb
input:
texasam!rice!baylor!csdept!baylor!rice!dev!bresearch!bpoucher
output:
texasam!rice!dev!bresearch!bpoucher
result:
ok single line: 'texasam!rice!dev!bresearch!bpoucher'
Test #2:
score: -100
Wrong Answer
time: 5ms
memory: 8008kb
input:
texasam!Rice!baYlor!csdept!BayloR!dev!Rice!bresearch!bpoucher
output:
texasam!Rice!bresearch!bpoucher
result:
wrong answer 1st lines differ - expected: 'texasam!Rice!baYlor!dev!Rice!bresearch!bpoucher', found: 'texasam!Rice!bresearch!bpoucher'