結果
問題 | No.3142 Balancing with O=>X Flip |
ユーザー |
![]() |
提出日時 | 2025-05-16 21:34:00 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 249 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 82,360 KB |
実行使用メモリ | 67,540 KB |
最終ジャッジ日時 | 2025-05-16 23:53:14 |
合計ジャッジ時間 | 1,915 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
ソースコード
N = int(input()) S = input() stack = [] for i in S: if(i == "("): stack.append("(") else: if(stack): stack.pop() else: print("No") exit() print("Yes" if len(stack) == 0 else "No")