結果

問題 No.1439 Let's Compare!!!!
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-04-03 23:47:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 525 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,976 KB
実行使用メモリ 19,612 KB
最終ジャッジ日時 2023-08-26 19:18:18
合計ジャッジ時間 9,647 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
9,260 KB
testcase_01 WA -
testcase_02 AC 22 ms
9,156 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