結果

問題 No.1439 Let's Compare!!!!
ユーザー c-yanc-yan
提出日時 2021-03-26 22:14:59
言語 PyPy3
(7.3.15)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 647 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 82,856 KB
実行使用メモリ 109,784 KB
最終ジャッジ日時 2024-11-29 08:48:31
合計ジャッジ時間 6,689 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
56,832 KB
testcase_01 AC 39 ms
51,712 KB
testcase_02 AC 38 ms
52,480 KB
testcase_03 AC 39 ms
51,712 KB
testcase_04 AC 39 ms
51,840 KB
testcase_05 AC 39 ms
51,968 KB
testcase_06 AC 39 ms
52,096 KB
testcase_07 AC 67 ms
70,400 KB
testcase_08 AC 81 ms
76,672 KB
testcase_09 AC 63 ms
66,432 KB
testcase_10 AC 258 ms
108,932 KB
testcase_11 AC 210 ms
109,592 KB
testcase_12 AC 205 ms
109,268 KB
testcase_13 AC 253 ms
109,768 KB
testcase_14 AC 254 ms
109,784 KB
testcase_15 AC 186 ms
106,912 KB
testcase_16 AC 187 ms
106,020 KB
testcase_17 AC 207 ms
104,480 KB
testcase_18 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

readline = stdin.readline

N = int(readline())
S = list(readline()[:-1])
T = list(readline()[:-1])
Q = int(readline())

p = 0
while p < N and S[p] == T[p]:
    p += 1

result = []
for _ in range(Q):
    c, x, y = readline().split()
    x = int(x) - 1
    if  c == 'S':
        S[x] = y
    elif c == 'T':
        T[x] = y
    if x < p and S[x] != T[x]:
        p = x
    elif x == p and S[x] == T[x]:
        while p < N and S[p] == T[p]:
            p += 1

    if p == N:
        result.append('=')
    elif S[p] > T[p]:
        result.append('>')
    elif S[p] < T[p]:
        result.append('<')
print(*result, sep='\n')
0