結果
問題 | No.1439 Let's Compare!!!! |
ユーザー | first_vil |
提出日時 | 2020-11-23 23:02:23 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 1,320 ms / 2,000 ms |
コード長 | 595 bytes |
コンパイル時間 | 1,428 ms |
コンパイル使用メモリ | 10,836 KB |
実行使用メモリ | 22,112 KB |
最終ジャッジ日時 | 2023-08-19 15:05:56 |
合計ジャッジ時間 | 14,357 ms |
ジャッジサーバーID (参考情報) |
judge10 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
8,160 KB |
testcase_01 | AC | 16 ms
8,172 KB |
testcase_02 | AC | 16 ms
7,988 KB |
testcase_03 | AC | 16 ms
8,116 KB |
testcase_04 | AC | 17 ms
7,884 KB |
testcase_05 | AC | 17 ms
7,988 KB |
testcase_06 | AC | 16 ms
7,976 KB |
testcase_07 | AC | 37 ms
8,584 KB |
testcase_08 | AC | 55 ms
8,492 KB |
testcase_09 | AC | 29 ms
8,372 KB |
testcase_10 | AC | 1,298 ms
21,836 KB |
testcase_11 | AC | 1,234 ms
18,416 KB |
testcase_12 | AC | 1,222 ms
18,072 KB |
testcase_13 | AC | 1,314 ms
22,112 KB |
testcase_14 | AC | 1,320 ms
21,976 KB |
testcase_15 | AC | 1,259 ms
18,692 KB |
testcase_16 | AC | 1,227 ms
18,396 KB |
testcase_17 | AC | 1,275 ms
12,696 KB |
testcase_18 | AC | 1,051 ms
11,964 KB |
ソースコード
def main(): 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) main()