結果
問題 | No.1439 Let's Compare!!!! |
ユーザー | 👑 H20 |
提出日時 | 2021-03-26 21:48:50 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,202 bytes |
コンパイル時間 | 518 ms |
コンパイル使用メモリ | 86,856 KB |
実行使用メモリ | 108,196 KB |
最終ジャッジ日時 | 2023-08-19 15:16:30 |
合計ジャッジ時間 | 12,233 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 65 ms
71,364 KB |
testcase_01 | AC | 68 ms
71,452 KB |
testcase_02 | AC | 67 ms
71,216 KB |
testcase_03 | AC | 68 ms
71,192 KB |
testcase_04 | AC | 69 ms
71,460 KB |
testcase_05 | AC | 68 ms
71,272 KB |
testcase_06 | AC | 67 ms
71,424 KB |
testcase_07 | AC | 130 ms
78,728 KB |
testcase_08 | AC | 153 ms
79,500 KB |
testcase_09 | AC | 115 ms
78,456 KB |
testcase_10 | AC | 723 ms
108,196 KB |
testcase_11 | AC | 625 ms
107,380 KB |
testcase_12 | AC | 593 ms
107,796 KB |
testcase_13 | AC | 689 ms
107,740 KB |
testcase_14 | AC | 724 ms
108,076 KB |
testcase_15 | AC | 622 ms
107,652 KB |
testcase_16 | AC | 606 ms
105,936 KB |
testcase_17 | AC | 643 ms
106,696 KB |
testcase_18 | TLE | - |
ソースコード
N = int(input()) S = list(input()) T = list(input()) Q = int(input()) for i in range(N): S[i]=int(S[i]) T[i]=int(T[i]) state = 0 # [0:=] [1:>] [2:<] for i in range(N): if S[i]<T[i]: state = 2 break if S[i]>T[i]: state = 1 break difi = i for i in range(Q): c,x,y=input().split() x=int(x) y=int(y) if c=='T': if T[x-1] == y: if state==0: print('=') elif state==1: print('>') else: print('<') continue else: T[x-1] = y else: if S[x-1] == y: if state==0: print('=') elif state==1: print('>') else: print('<') continue else: S[x-1] = y if difi>=x-1: for j in range(x-1,N): if S[j]<T[j]: state = 2 break if S[j]>T[j]: state = 1 break else: state=0 difi = j if state==0: print('=') elif state==1: print('>') else: print('<')