結果

問題 No.1439 Let's Compare!!!!
ユーザー brthyyjpbrthyyjp
提出日時 2021-03-26 22:02:04
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,058 bytes
コンパイル時間 712 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 79,020 KB
最終ジャッジ日時 2023-08-19 15:20:21
合計ジャッジ時間 3,958 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,116 KB
testcase_01 AC 68 ms
71,296 KB
testcase_02 AC 66 ms
71,468 KB
testcase_03 AC 67 ms
71,108 KB
testcase_04 AC 67 ms
71,292 KB
testcase_05 AC 68 ms
71,120 KB
testcase_06 AC 66 ms
71,376 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 98 ms
77,040 KB
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import io, os
input = sys.stdin.readline
#input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

n = int(input())
s = int(input())
t = int(input())

S = list(str(s))
T = list(str(t))
S = [int(c) for c in S]
T = [int(c) for c in T]
S = [0]*(n-len(S))+S
T = [0]*(n-len(T))+T
for i in range(n):
    if S[i] != T[i]:
        p = i
        break
else:
    p = n
#print(S)
#print(T)

#N = 2*10**5+50
#table = [0]*(N+1)
#table[0] = 1
#for i in range(1, N+1):
    #table[i] = table[i-1]*10

q = int(input())
for i in range(q):
    c, x, y = map(str, input().rstrip().split())
    #print(c, x, y)
    x, y = int(x), int(y)
    x -= 1
    if c == 'S':
        S[x] = y
    else:
        T[x] = y
    if x < p:
        p = x
    if S[p] == T[p]:
        for j in range(p, n):
            if S[j] != T[j]:
                p = j
                break
        else:
            p = n
    if p != n:
        if S[p] > T[p]:
            print('>')
        else:
            print('<')
    else:
        print('=')

    #print(p)
    #print(S)
    #print(T)
0