結果
| 問題 |
No.1208 anti primenumber game
|
| コンテスト | |
| ユーザー |
Example0911
|
| 提出日時 | 2020-08-30 14:01:30 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 764 bytes |
| コンパイル時間 | 1,778 ms |
| コンパイル使用メモリ | 168,588 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-15 07:10:14 |
| 合計ジャッジ時間 | 3,881 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 WA * 10 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
#define int long long
#define ll long long
#define rep(i,n) for(ll i = 0; i < (n); i++)
#define P pair<ll,ll>
#define ld long double
ll INF = (1LL << 60);
int mod = 1000000007;
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, m; cin >> n >> m;
vector<int>a(n); rep(i, n)cin >> a[i];
bool sente = true;
int s = 0, k = 0;
rep(i, n) {
if (a[i] == 1) {
if (sente) {
s += -m + 1;
sente = false;
}
else {
k += -m + 1;
sente = true;
}
}
else {
if (sente) {
s += a[i] - 1;
k += -m + 1;
}
else {
s += -m + 1;
k += a[i] - 1;
}
}
}
if (s <= k) {
cout << "Second" << endl;
}
else {
cout << "First" << endl;
}
return 0;
}
Example0911