結果

問題 No.2398 ヒドラ崩し
ユーザー gew1fw
提出日時 2025-06-12 14:45:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 209 bytes
コンパイル時間 176 ms
コンパイル使用メモリ 82,484 KB
実行使用メモリ 66,508 KB
最終ジャッジ日時 2025-06-12 14:46:46
合計ジャッジ時間 2,715 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

H = input().strip()
current_depth = 0
xor_sum = 0

for c in H:
    if c == '(':
        current_depth += 1
    else:
        xor_sum ^= current_depth
        current_depth -= 1

print(0 if xor_sum != 0 else 1)
0