結果
問題 | No.1439 Let's Compare!!!! |
ユーザー |
|
提出日時 | 2021-03-26 21:58:32 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,221 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 82,036 KB |
実行使用メモリ | 150,380 KB |
最終ジャッジ日時 | 2024-11-28 23:05:34 |
合計ジャッジ時間 | 12,107 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 33 ms
59,560 KB |
testcase_01 | AC | 32 ms
150,380 KB |
testcase_02 | AC | 33 ms
59,384 KB |
testcase_03 | AC | 34 ms
146,920 KB |
testcase_04 | AC | 33 ms
59,688 KB |
testcase_05 | WA | - |
testcase_06 | AC | 32 ms
52,420 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | AC | 212 ms
97,452 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 337 ms
98,104 KB |
testcase_16 | TLE | - |
testcase_17 | TLE | - |
testcase_18 | TLE | - |
ソースコード
import sys input = sys.stdin.readline N = int(input()) S = list(input().rstrip("\n")) T = list(input().rstrip("\n")) Q = int(input()) tigauketa = N for i in range(N): if S[i] != T[i]: tigauketa = i break if S > T: prevans = ">" elif S == T: prevans = "=" else: prevans = "<" for iii in range(Q): c, x, y = input().split() x = int(x) - 1 if c == "S": S[x] = y else: T[x] = y if x <= tigauketa: if S[x] == T[x]: tigauketa = N for i in range(x + 1, N): if S[i] != T[i]: tigauketa = i break if tigauketa == N: prevans = "=" print("=") elif S[tigauketa] > T[tigauketa]: prevnans = ">" print(">") else: prevans = "<" print("<") else: tigauketa = x if S > T: prevans = ">" print(">") elif S == T: prevnans = "=" print("=") else: prevans = "<" print("<") else: print(prevans)