結果

問題 No.1439 Let's Compare!!!!
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-04-03 23:47:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 525 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 112,752 KB
最終ジャッジ日時 2023-08-26 19:18:35
合計ジャッジ時間 9,773 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
79,676 KB
testcase_01 WA -
testcase_02 AC 138 ms
79,640 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 RE -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 RE -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

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)
    while l:
        p = heappop(l)
        if s[p] != t[p]:
            print(">" if s[p] > t[p] else "<")
            break
    else:
        print("=")
0