結果
| 問題 | No.2044 Infinite Nim |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-09-17 00:49:08 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 6 ms / 2,000 ms |
| + 758µs | |
| コード長 | 1,082 bytes |
| 記録 | |
| コンパイル時間 | 1,178 ms |
| コンパイル使用メモリ | 213,736 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-09-17 00:49:13 |
| 合計ジャッジ時間 | 4,067 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pairi = pair<ll, ll>;
#define fi first
#define se second
const ll INF = 4e18;
const ll MOD = 1e9 + 7;
const ll base = 31;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
void solve() {
ll n; cin >> n;
vector<ll> a(n);
for (int i = 0; i < n; i++) cin >> a[i];
ll res = 0;
for (ll x : a) if (x) res ^= x;
cout << (res ? "First" : "Second");
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cerr << "Program started.\n";
auto start = chrono::steady_clock::now();
string problem = "std";
if (fopen((problem + ".INP").c_str(), "r")) {
freopen((problem + ".INP").c_str(), "r", stdin);
freopen((problem + ".OUT").c_str(), "w", stdout);
}
int testcase = 1; //cin >> testcase;
while (testcase--) solve();
auto end = chrono::steady_clock::now();
cerr << "Program finished in " << chrono::duration_cast<chrono::milliseconds>(end - start).count() << " ms.";
}
vjudge1