結果
問題 |
No.2282 Boxed Nim
|
ユーザー |
|
提出日時 | 2023-04-29 08:51:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 812 bytes |
コンパイル時間 | 1,329 ms |
コンパイル使用メモリ | 172,004 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-18 07:47:09 |
合計ジャッジ時間 | 3,005 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 4 |
ソースコード
// #include "atcoder/all" #include <bits/stdc++.h> using ll = long long; const int MOD1000000007 = 1000000007; const int MOD998244353 = 998244353; const double PI = 3.14159265358979323846264338327950288; void solve(); int main() { std::ios_base::sync_with_stdio(false); // std::cin.tie(0); #ifdef LOCAL freopen("input.txt", "r", stdin); #endif // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); solve(); return 0; } void solve() { int n; scanf("%d", &n); std::vector<int> a(n); int ans = 0; for (int i = 0; i < n; i++) { // ans ^= 1; scanf("%d", &a[i]); ans ^= a[i]; } ans = (ans > 0); sort(a.begin(), a.end()); if (a[0] == 0) printf("First\n"); else printf("Second\n"); }