結果
| 問題 |
No.1439 Let's Compare!!!!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-03 23:47:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 525 bytes |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 108,464 KB |
| 最終ジャッジ日時 | 2024-12-25 20:36:26 |
| 合計ジャッジ時間 | 9,171 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 1 WA * 11 RE * 5 |
ソースコード
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)
while l:
p = heappop(l)
if s[p] != t[p]:
print(">" if s[p] > t[p] else "<")
break
else:
print("=")