結果
| 問題 |
No.3140 Weird Parentheses Game
|
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2025-05-16 21:25:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 268 bytes |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 82,908 KB |
| 実行使用メモリ | 55,228 KB |
| 最終ジャッジ日時 | 2025-10-28 07:38:14 |
| 合計ジャッジ時間 | 2,292 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
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