結果

問題 No.1439 Let's Compare!!!!
ユーザー gorugo30gorugo30
提出日時 2021-03-26 21:50:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,073 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,484 KB
最終ジャッジ日時 2024-05-06 15:17:12
合計ジャッジ時間 14,965 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
17,824 KB
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 31 ms
10,752 KB
testcase_04 AC 32 ms
10,624 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 1,205 ms
14,440 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 1,282 ms
14,664 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = list(input())
T = list(input())
Q = int(input())

tigauketa = N
for i in range(N):
    if S[i] != T[i]:
        tigauketa = i
        break
if S > T:
    prevans = ">"
elif S == T:
    prevans = "="
else:
    prevans = "<"
for iii in range(Q):
    c, x, y = input().split()
    x = int(x) - 1
    if c == "S":
        S[x] = y
    else:
        T[x] = y
    if x <= tigauketa:
        if S[x] == T[x]:
            tigauketa = N
            for i in range(x + 1, N):
                if S[i] != T[i]:
                    tigauketa = i
                    break
            if x == N - 1:
                print("=")
                prevans = "="
                tigauketa = N
            else:
                print(prevans)
            continue
        else:
            tigauketa = x
            if S > T:
                prevans = ">"
                print(">")
            elif S == T:
                prevnans = "="
                print("=")
            else:
                prevans = "<"
                print("<")
    else:
        print(prevans)
0