結果
| 問題 | No.1439 Let's Compare!!!! | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-04-01 23:27:04 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 659 bytes | 
| コンパイル時間 | 497 ms | 
| コンパイル使用メモリ | 81,916 KB | 
| 実行使用メモリ | 190,856 KB | 
| 最終ジャッジ日時 | 2024-12-21 07:16:32 | 
| 合計ジャッジ時間 | 24,489 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 11 TLE * 6 | 
ソースコード
N=int(input())
S=list(input())
T=list(input())
Q=int(input())
S_set,T_set=set([300000]),set([300000])
for i in range(N):
    if S[i]>T[i]:
        S_set.add(i)
    elif S[i]<T[i]:
        T_set.add(i)
for i in range(Q):
    c,x,y=input().split()
    x=int(x)-1
    if c=="T":
        T[x]=y
    if c=="S":
        S[x]=y
    if int(T[x])<int(S[x]):
        S_set.add(x)
        T_set.discard(x)
    elif int(T[x])>int(S[x]):
        T_set.add(x)
        S_set.discard(x)
    else:
        T_set.discard(x)
        S_set.discard(x)
    if min(S_set)<min(T_set):
        print(">")
    elif min(S_set)>min(T_set):
        print("<")
    else:
        print("=")
            
            
            
        