結果

問題 No.1439 Let's Compare!!!!
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-04-03 23:49:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,064 ms / 2,000 ms
コード長 556 bytes
コンパイル時間 627 ms
コンパイル使用メモリ 87,172 KB
実行使用メモリ 121,168 KB
最終ジャッジ日時 2023-08-26 19:22:18
合計ジャッジ時間 12,541 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
79,656 KB
testcase_01 AC 135 ms
79,656 KB
testcase_02 AC 134 ms
79,748 KB
testcase_03 AC 137 ms
79,760 KB
testcase_04 AC 136 ms
79,796 KB
testcase_05 AC 136 ms
79,796 KB
testcase_06 AC 138 ms
79,812 KB
testcase_07 AC 265 ms
83,696 KB
testcase_08 AC 287 ms
83,732 KB
testcase_09 AC 228 ms
83,084 KB
testcase_10 AC 1,012 ms
113,088 KB
testcase_11 AC 1,064 ms
121,112 KB
testcase_12 AC 945 ms
119,024 KB
testcase_13 AC 981 ms
113,040 KB
testcase_14 AC 1,029 ms
114,064 KB
testcase_15 AC 1,014 ms
121,168 KB
testcase_16 AC 995 ms
116,832 KB
testcase_17 AC 924 ms
104,432 KB
testcase_18 AC 611 ms
100,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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("=")
0