結果

問題 No.2044 Infinite Nim
ユーザー bit_kyopro
提出日時 2022-08-19 22:35:14
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 632 bytes
コンパイル時間 829 ms
コンパイル使用メモリ 75,608 KB
最終ジャッジ日時 2025-01-31 01:26:00
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <set>
#include <algorithm>
#include <vector>

using namespace std;
using ll = long long;


int main() {
    int n; cin >> n;
    ll inf = 0;
    for (int i=0; i<n; i++) {
        ll val;
        cin >> val;
        if (val == -1) inf++;
    }
    if (inf == 0) {
        cout << "Second" << endl;
    }
    else if (inf == 1) {
        cout << "First" << endl;
    }
    else if (inf == n) {
        if (n % 2 == 0) {
            cout << "Second" << endl;
        }
        else {
            cout << "Frist" << endl;
        }
    }
    else {
        cout << "First" << endl;
    }
}
0