結果
| 問題 | No.3140 Weird Parentheses Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-04 04:31:46 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 307 bytes |
| 記録 | |
| コンパイル時間 | 1,172 ms |
| コンパイル使用メモリ | 174,680 KB |
| 実行使用メモリ | 9,812 KB |
| 最終ジャッジ日時 | 2026-09-04 04:31:52 |
| 合計ジャッジ時間 | 3,391 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 13 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
using ll = long long;
int main(void){
int n; string s; cin >> n >> s;
int cnt=0, x=0;
for(auto p:s){
if(p=='(') x++;
else{
if(x) x--, cnt++;
}
}
cout << (cnt&1?"First":"Second") << endl;
return 0;
}