結果
問題 |
No.1439 Let's Compare!!!!
|
ユーザー |
|
提出日時 | 2021-04-03 23:49:50 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,050 ms / 2,000 ms |
コード長 | 556 bytes |
コンパイル時間 | 180 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 116,404 KB |
最終ジャッジ日時 | 2024-12-25 20:45:57 |
合計ジャッジ時間 | 10,849 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 17 |
ソースコード
from heapq import * from re import split n = int(input()) s, t = list(input()), list(input()) l = [] heapify(l) for i in range(n): if s[i] != t[i]: heappush(l, i) for _ in range(int(input())): c, x, y = input().split() x = int(x) if c == "S": s[x - 1] = y else: t[x - 1] = y if s[x - 1] != t[x - 1]: heappush(l, x - 1) while l: p = heappop(l) if s[p] != t[p]: print(">" if s[p] > t[p] else "<") heappush(l, p) break else: print("=")