結果
| 問題 | No.3140 Weird Parentheses Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-16 21:22:50 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 246 bytes |
| 記録 | |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 95,976 KB |
| 実行使用メモリ | 79,360 KB |
| 最終ジャッジ日時 | 2026-07-10 17:49:20 |
| 合計ジャッジ時間 | 3,293 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 13 |
ソースコード
from collections import deque
N = int(input())
S = input()
q = deque()
cnt = 0
for s in S:
if q:
if q[-1] == "(" and s == ")":
cnt += 1
else:
q.append(s)
ans = "First" if cnt % 2 != 0 else "Second"
print(ans)