結果
問題 | No.1439 Let's Compare!!!! |
ユーザー |
|
提出日時 | 2022-02-15 18:55:56 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,599 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 82,224 KB |
実行使用メモリ | 102,268 KB |
最終ジャッジ日時 | 2024-06-29 07:07:35 |
合計ジャッジ時間 | 6,518 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 WA * 6 |
ソースコード
n = int(input()) S = list(map(int, list(input()))) T = list(map(int, list(input()))) op_idx = -1 for i in range(n): if S[i] != T[i]: op_idx = i break q = int(input()) for _ in range(q): c, x, y = input().split() x = int(x) y = int(y) x -= 1 if c == 'S': if S[x] != y: S[x] = y else: if op_idx == -1: print('=') elif S[op_idx] > T[op_idx]: print('>') elif S[op_idx] < T[op_idx]: print('<') continue elif c == 'T': if T[x] != y: T[x] = y else: if op_idx == -1: print('=') elif S[op_idx] > T[op_idx]: print('>') elif S[op_idx] < T[op_idx]: print('<') continue if x > op_idx: if S[op_idx] > T[op_idx]: print('>') elif S[op_idx] < T[op_idx]: print('<') elif x < op_idx: if S[x] > T[x]: print('>') elif S[x] < T[x]: print('<') op_idx = x else: if S[x] > T[x]: print('>') elif S[x] < T[x]: print('<') else: op_idx = -1 for i in range(x + 1, n): if S[i] > T[i]: print('>') op_idx = i break if S[i] < T[i]: print('<') op_idx = i break if op_idx == -1: print('=')