結果

問題 No.1439 Let's Compare!!!!
ユーザー c-yanc-yan
提出日時 2021-03-26 22:14:59
言語 PyPy3
(7.3.15)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 647 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 86,804 KB
実行使用メモリ 110,692 KB
最終ジャッジ日時 2023-08-19 15:21:32
合計ジャッジ時間 6,868 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
75,484 KB
testcase_01 AC 61 ms
71,368 KB
testcase_02 AC 64 ms
71,204 KB
testcase_03 AC 62 ms
70,904 KB
testcase_04 AC 63 ms
71,156 KB
testcase_05 AC 62 ms
71,356 KB
testcase_06 AC 62 ms
71,128 KB
testcase_07 AC 82 ms
76,472 KB
testcase_08 AC 92 ms
77,728 KB
testcase_09 AC 78 ms
76,576 KB
testcase_10 AC 230 ms
108,928 KB
testcase_11 AC 198 ms
110,504 KB
testcase_12 AC 188 ms
110,692 KB
testcase_13 AC 229 ms
109,192 KB
testcase_14 AC 230 ms
109,612 KB
testcase_15 AC 177 ms
108,936 KB
testcase_16 AC 179 ms
104,864 KB
testcase_17 AC 200 ms
105,632 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