提出 #75730205


ソースコード 拡げる

#include <bits/stdc++.h>
#define fastio cin.tie(0)->sync_with_stdio(0)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define compress(v) sort(all(v)), v.erase(unique(all(v)), v.end())
#define sz(x) (int)(x).size()
using namespace std;
typedef long long ll;

int main() {
    fastio; int T; cin >> T;
    for (int tc = 0; tc < T; tc++) {
        int N, K; cin >> N >> K;
        vector<vector<int>> v(N, vector<int>(N));
        for (auto &i : v) for (auto &j : i) cin >> j;
        int ans = 0;
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                if ((i+j)%2) ans ^= v[i][j] % (K+1);
            }
        }
        cout << (ans ? "Alice" : "Bob") << "\n";
    }
    return 0;
}

提出情報

提出日時
問題 D - Grid Game
ユーザ Lov34ever
言語 C++23 (GCC 15.2.0)
得点 500
コード長 777 Byte
結果 AC
実行時間 17 ms
メモリ 3728 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 500 / 500
結果
AC × 1
AC × 14
セット名 テストケース
Sample 00_sample_00.txt
All 00_sample_00.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 01_handmade_03.txt, 02_random_00.txt, 02_random_01.txt, 02_random_02.txt, 02_random_03.txt, 02_random_04.txt, 02_random_05.txt, 02_random_06.txt, 02_random_07.txt, 02_random_08.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3448 KiB
01_handmade_00.txt AC 17 ms 3600 KiB
01_handmade_01.txt AC 1 ms 3544 KiB
01_handmade_02.txt AC 1 ms 3536 KiB
01_handmade_03.txt AC 3 ms 3668 KiB
02_random_00.txt AC 13 ms 3728 KiB
02_random_01.txt AC 13 ms 3600 KiB
02_random_02.txt AC 13 ms 3672 KiB
02_random_03.txt AC 13 ms 3728 KiB
02_random_04.txt AC 13 ms 3556 KiB
02_random_05.txt AC 13 ms 3664 KiB
02_random_06.txt AC 13 ms 3728 KiB
02_random_07.txt AC 13 ms 3728 KiB
02_random_08.txt AC 13 ms 3576 KiB