結果
問題 | No.1439 Let's Compare!!!! |
ユーザー | first_vil |
提出日時 | 2020-11-23 23:06:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 937 ms / 2,000 ms |
コード長 | 580 bytes |
コンパイル時間 | 465 ms |
コンパイル使用メモリ | 87,160 KB |
実行使用メモリ | 117,532 KB |
最終ジャッジ日時 | 2023-08-19 15:06:30 |
合計ジャッジ時間 | 9,952 ms |
ジャッジサーバーID (参考情報) |
judge10 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 67 ms
71,288 KB |
testcase_01 | AC | 69 ms
71,280 KB |
testcase_02 | AC | 65 ms
71,212 KB |
testcase_03 | AC | 66 ms
71,288 KB |
testcase_04 | AC | 66 ms
71,432 KB |
testcase_05 | AC | 67 ms
71,212 KB |
testcase_06 | AC | 66 ms
71,284 KB |
testcase_07 | AC | 166 ms
79,936 KB |
testcase_08 | AC | 203 ms
79,292 KB |
testcase_09 | AC | 156 ms
78,372 KB |
testcase_10 | AC | 873 ms
109,528 KB |
testcase_11 | AC | 937 ms
117,036 KB |
testcase_12 | AC | 839 ms
115,216 KB |
testcase_13 | AC | 844 ms
109,792 KB |
testcase_14 | AC | 883 ms
111,656 KB |
testcase_15 | AC | 898 ms
117,532 KB |
testcase_16 | AC | 831 ms
112,948 KB |
testcase_17 | AC | 767 ms
99,908 KB |
testcase_18 | AC | 476 ms
95,932 KB |
ソースコード
from heapq import heappop,heappush,heapify n=int(input()) s=list(input()) t=list(input()) diff=[] heapify(diff) for i in range(n): if s[i]!=t[i]: heappush(diff,i) q=int(input()) for _ in range(q): c,x,y=input().split() x=int(x)-1 if c=='S': s[x]=y else: t[x]=y if s[x]!=t[x]: heappush(diff,x) k=-1 while diff: j=heappop(diff) if s[j]!=t[j]: k=j break if k==-1: print('=') else: print('>' if s[k]>t[k] else '<') heappush(diff,k)