結果
| 問題 | No.3141 Balancing with X=>O Flip |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-01 08:50:27 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 66 ms / 2,000 ms |
| + 472µs | |
| コード長 | 130 bytes |
| 記録 | |
| コンパイル時間 | 245 ms |
| コンパイル使用メモリ | 96,080 KB |
| 実行使用メモリ | 83,444 KB |
| 最終ジャッジ日時 | 2026-09-01 08:50:32 |
| 合計ジャッジ時間 | 3,692 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
N = int(input())
S = input()
di = {"(": 0, ")": 0}
for i in S:
di[i] += 1
if di["("] == di[")"]:
print("Yes")
else:
print("No")