結果
問題 | No.3142 Balancing with O=>X Flip |
ユーザー |
![]() |
提出日時 | 2025-05-16 21:25:36 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 45 ms / 2,000 ms |
コード長 | 181 bytes |
コンパイル時間 | 196 ms |
コンパイル使用メモリ | 82,468 KB |
実行使用メモリ | 67,084 KB |
最終ジャッジ日時 | 2025-05-16 23:52:18 |
合計ジャッジ時間 | 2,158 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 25 |
ソースコード
input() ok = True d = 0 for c in input(): if c == '(': d += 1 else: if not d: ok = False d -= 1 ok &= d == 0 print('Yes' if ok else 'No')