結果

問題 No.1665 quotient replace
ユーザー eve__fuyukieve__fuyuki
提出日時 2024-04-09 21:25:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 542 bytes
コンパイル時間 2,311 ms
コンパイル使用メモリ 195,444 KB
実行使用メモリ 11,136 KB
最終ジャッジ日時 2024-04-09 21:25:56
合計ジャッジ時間 8,124 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
7,108 KB
testcase_01 AC 29 ms
7,136 KB
testcase_02 AC 30 ms
7,220 KB
testcase_03 AC 29 ms
7,104 KB
testcase_04 AC 29 ms
7,100 KB
testcase_05 AC 29 ms
7,192 KB
testcase_06 AC 29 ms
7,128 KB
testcase_07 AC 29 ms
7,244 KB
testcase_08 AC 29 ms
7,288 KB
testcase_09 AC 31 ms
7,192 KB
testcase_10 AC 65 ms
8,568 KB
testcase_11 AC 109 ms
10,108 KB
testcase_12 AC 38 ms
7,432 KB
testcase_13 AC 145 ms
10,976 KB
testcase_14 AC 139 ms
11,048 KB
testcase_15 AC 136 ms
11,024 KB
testcase_16 AC 134 ms
10,988 KB
testcase_17 AC 135 ms
11,136 KB
testcase_18 AC 29 ms
7,212 KB
testcase_19 AC 30 ms
7,040 KB
testcase_20 AC 29 ms
7,228 KB
testcase_21 AC 31 ms
6,996 KB
testcase_22 AC 32 ms
7,204 KB
testcase_23 AC 34 ms
7,000 KB
testcase_24 AC 33 ms
7,140 KB
testcase_25 AC 29 ms
7,128 KB
testcase_26 AC 29 ms
7,056 KB
testcase_27 AC 30 ms
7,280 KB
testcase_28 AC 32 ms
7,232 KB
testcase_29 AC 36 ms
7,484 KB
testcase_30 AC 85 ms
9,088 KB
testcase_31 AC 111 ms
10,188 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 29 ms
7,104 KB
testcase_43 AC 28 ms
6,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;
void fast_io() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
}

int main() {
    fast_io();
    const int M = 1e6;
    vector<int> fac_cnt(M + 1);
    for (int i = 2; i <= M; i++) {
        for (int j = i; j <= M; j += i) {
            fac_cnt[j]++;
        }
    }
    int n;
    cin >> n;
    int grundy = 0;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
        grundy ^= fac_cnt[a[i]];
    }
    cout << (grundy ? "white" : "black") << endl;
}
0