結果
| 問題 |
No.1439 Let's Compare!!!!
|
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-03-26 21:56:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 334 ms / 2,000 ms |
| コード長 | 573 bytes |
| コンパイル時間 | 226 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 112,588 KB |
| 最終ジャッジ日時 | 2024-11-29 08:45:06 |
| 合計ジャッジ時間 | 4,692 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
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