結果
| 問題 | No.3140 Weird Parentheses Game |
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2025-05-16 21:25:04 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 268 bytes |
| 記録 | |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 96,140 KB |
| 実行使用メモリ | 79,704 KB |
| 最終ジャッジ日時 | 2026-07-20 22:29:35 |
| 合計ジャッジ時間 | 3,402 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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