結果
| 問題 | No.3090 NimNim | 
| コンテスト | |
| ユーザー |  SnowBeenDiding | 
| 提出日時 | 2025-04-04 22:46:57 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 665 bytes | 
| コンパイル時間 | 5,884 ms | 
| コンパイル使用メモリ | 332,304 KB | 
| 実行使用メモリ | 7,844 KB | 
| 最終ジャッジ日時 | 2025-04-04 22:47:05 | 
| 合計ジャッジ時間 | 7,420 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 WA * 5 | 
ソースコード
#include <atcoder/all>
#include <bits/stdc++.h>
#define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
using namespace atcoder;
using namespace std;
typedef long long ll;
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, m;
    cin >> n >> m;
    vector<int> a(n), b(m);
    int gra = 0, grb = 0;
    rep(i, 0, n) {
        cin >> a[i];
        gra ^= a[i];
    }
    rep(i, 0, m) {
        cin >> b[i];
        grb ^= b[i];
    }
    if (gra >= 2) {
        cout << "First\n";
        return 0;
    }
    if (gra == 1) {
        cout << (grb == 0 ? "Second" : "First") << "\n";
        return 0;
    }
    cout << "Second\n";
}
            
            
            
        