結果
| 問題 |
No.3144 Parentheses Modification and Rotation (01 Ver.)
|
| コンテスト | |
| ユーザー |
naniwazu
|
| 提出日時 | 2025-03-28 02:52:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 103 bytes |
| コンパイル時間 | 372 ms |
| コンパイル使用メモリ | 82,548 KB |
| 実行使用メモリ | 54,256 KB |
| 最終ジャッジ日時 | 2025-05-13 23:26:29 |
| 合計ジャッジ時間 | 3,342 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
N = int(input())
S = input()
if N % 2 == 1:
print(-1)
else:
print(abs(N // 2 - S.count("(")))
naniwazu