結果
| 問題 | No.3142 Balancing with O=>X Flip |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2025-05-16 21:28:51 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 183 bytes |
| 記録 | |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 93,664 KB |
| 最終ジャッジ日時 | 2026-07-10 17:52:02 |
| 合計ジャッジ時間 | 4,394 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 1 |
| other | AC * 13 WA * 7 RE * 5 |
ソースコード
N = int(input())
S = list(input())
stack = []
for s in S:
stack.append(s)
if len(S) >= 2 and S[-2:] == ["(", ")"]:
stack.pop()
stack.pop()
print("Yes" if not stack else "No")