結果
| 問題 | No.3142 Balancing with O=>X Flip |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-16 21:33:00 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 2,000 ms |
| コード長 | 138 bytes |
| 記録 | |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 21,412 KB |
| 実行使用メモリ | 15,996 KB |
| 最終ジャッジ日時 | 2026-07-10 18:41:13 |
| 合計ジャッジ時間 | 4,232 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 |
ソースコード
N = int(input())
if N%2:
print("No")
exit()
S = input()
print("Yes" if S[0] == "(" and S[-1] == ")" and S.count("(") == N//2 else "No")