結果
| 問題 | No.3140 Weird Parentheses Game |
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2025-05-16 21:25:04 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 82,156 KB |
| 実行使用メモリ | 55,608 KB |
| 最終ジャッジ日時 | 2026-01-29 12:31:15 |
| 合計ジャッジ時間 | 2,187 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 WA * 1 |
ソースコード
from collections import deque
d=deque()
N=int(input())
A=[]
S=input()
c=0
for s in S:
d.append(s)
if s=='(':
c+=1
else:
c-=1
if c==0:
A.append(len(d)//2)
d=deque()
c=0
for a in A:
c^=a
if c!=0:
print('First')
else:
print('Second')
timi