結果
| 問題 | No.3503 Brackets Stack Query 2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-18 03:41:41 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 251 bytes |
| 記録 | |
| コンパイル時間 | 1,762 ms |
| コンパイル使用メモリ | 81,068 KB |
| 実行使用メモリ | 81,448 KB |
| 最終ジャッジ日時 | 2026-09-08 06:01:39 |
| 合計ジャッジ時間 | 7,718 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 1 |
| other | RE * 30 |
ソースコード
def check(s):
while True:
s = s.replace("(|)", "")
if "(|)" not in s:
return s == ""
S = ""
for i in range(int(input())):
q = input()
if q.startswith("1"):
S += q[2:]
else:
S = S[:-1]
print("Yes" if check(S) else "No")