結果

問題 No.1439 Let's Compare!!!!
ユーザー O2MTO2MT
提出日時 2021-03-27 16:24:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 675 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,284 KB
実行使用メモリ 277,996 KB
最終ジャッジ日時 2024-05-06 21:57:50
合計ジャッジ時間 4,778 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

N = int(input())
S = list(str(input()))
T = list(str(input()))
Q = int(input())
A = set()
for i in range(N):
    if S[i] != T[i]:
        A.add(i)
# print(A)
l = list(">>>>>>><>>>>>>>>><<<")
for _ in range(Q):
    c,x,y = map(str,input().split())
    x = int(x)-1
    if c == 'T':
        T[x] = y
    else:
        S[x] = y
    if S[x] != T[x]:
        A.add(x)
    else:
        if x in A:
            A.remove(x)
    if A == set():
        print('=')
        continue
    # print(A)
    a = list(A)[0]
    ans = ''
    if S[a] > T[a]:
        ans = '>'
    elif S[a] < T[a]:
        ans = '<'
    else:
        ans = '='
    print(ans)
    # b = ans == l[_]
    # print(b)
0