結果
| 問題 | No.1439 Let's Compare!!!! |
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-03-26 21:56:14 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 215 ms / 2,000 ms |
| + 212µs | |
| コード長 | 573 bytes |
| 記録 | |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 64,492 KB |
| 実行使用メモリ | 94,480 KB |
| 最終ジャッジ日時 | 2026-10-15 22:54:32 |
| 合計ジャッジ時間 | 6,354 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 |
ソースコード
import sys
import heapq
hpush = heapq.heappush
hpop = heapq.heappop
input = sys.stdin.readline
N = int(input())
S = list(map(int, list(input())[: -1]))
T = list(map(int, list(input())[: -1]))
h = []
for i in range(N):
if S[i] != T[i]: hpush(h, i)
for _ in range(int(input())):
c, x, y = input().split()
x = int(x) - 1
y = int(y)
if c == "S": S[x] = y
if c == "T": T[x] = y
if S[x] != T[x]: hpush(h, x)
while len(h) and S[h[0]] == T[h[0]]: hpop(h)
if len(h):
i = h[0]
if S[i] > T[i]: print(">")
if S[i] < T[i]: print("<")
else: print("=")
wolgnik