結果
問題 |
No.715 集合と二人ゲーム
|
ユーザー |
|
提出日時 | 2025-02-10 22:12:12 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,132 bytes |
コンパイル時間 | 3,619 ms |
コンパイル使用メモリ | 281,708 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-10 22:12:26 |
合計ジャッジ時間 | 7,128 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 60 |
ソースコード
#include <bits/stdc++.h> // #include <atcoder/all> // using mint = atcoder::static_modint<998244353>; // using mint = atcoder::static_modint<1000000007>; using namespace std; // using namespace atcoder; using ld = long double; using ll = long long; #define mp(a,b) make_pair(a,b) #define rep(i,s,n) for(int i=s; i<(int)n; i++) const vector<int> dx{1,0,-1,0},dy{0,1,0,-1}; vector<int> experiment(){ vector<int> G(34); G[1]=true; rep(i,2,34){ vector<bool> b(16); b[G[i-2]]=true; rep(j,2,i){ b[G[j-2]^G[i-(j+1)]]=true; } while(b[G[i]])G[i]++; } // rep(i,0,60)cout << i << " " << G[i] << "\n"; // cout << clock() << "\n"; // cout << *max_element(G.begin(),G.end()); return G; } int main(){ auto v=experiment(); int n;cin >> n; int a[n+1];rep(i,0,n)cin >> a[i]; a[n]=2e9; sort(a,a+n+1); int cnt=1; int g=0; rep(i,1,n+1){ if(a[i-1]+1==a[i])cnt++; else{ cout << cnt << " "; g^=v[cnt%34]; cnt=1; } } if(g)cout <<"First\n"; else cout << "Second\n"; }