結果

問題 No.1665 quotient replace
ユーザー ktr216ktr216
提出日時 2021-09-03 21:49:00
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 547 ms / 3,000 ms
コード長 605 bytes
コンパイル時間 2,531 ms
コンパイル使用メモリ 165,132 KB
実行使用メモリ 7,012 KB
最終ジャッジ日時 2023-08-21 21:08:13
合計ジャッジ時間 17,666 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 216 ms
6,816 KB
testcase_01 AC 217 ms
6,704 KB
testcase_02 AC 217 ms
6,816 KB
testcase_03 AC 217 ms
6,900 KB
testcase_04 AC 218 ms
6,792 KB
testcase_05 AC 217 ms
6,696 KB
testcase_06 AC 219 ms
6,688 KB
testcase_07 AC 217 ms
6,748 KB
testcase_08 AC 219 ms
6,804 KB
testcase_09 AC 227 ms
6,736 KB
testcase_10 AC 325 ms
6,796 KB
testcase_11 AC 465 ms
6,992 KB
testcase_12 AC 244 ms
6,752 KB
testcase_13 AC 535 ms
6,792 KB
testcase_14 AC 540 ms
6,800 KB
testcase_15 AC 538 ms
7,012 KB
testcase_16 AC 547 ms
6,744 KB
testcase_17 AC 547 ms
6,684 KB
testcase_18 AC 217 ms
6,796 KB
testcase_19 AC 217 ms
6,740 KB
testcase_20 AC 217 ms
6,800 KB
testcase_21 AC 217 ms
6,816 KB
testcase_22 AC 216 ms
6,692 KB
testcase_23 AC 217 ms
6,820 KB
testcase_24 AC 215 ms
6,696 KB
testcase_25 AC 218 ms
6,816 KB
testcase_26 AC 219 ms
6,692 KB
testcase_27 AC 220 ms
6,820 KB
testcase_28 AC 228 ms
6,960 KB
testcase_29 AC 239 ms
6,740 KB
testcase_30 AC 375 ms
6,796 KB
testcase_31 AC 454 ms
6,828 KB
testcase_32 AC 455 ms
6,864 KB
testcase_33 AC 304 ms
6,892 KB
testcase_34 AC 407 ms
6,796 KB
testcase_35 AC 390 ms
6,908 KB
testcase_36 AC 396 ms
6,820 KB
testcase_37 AC 382 ms
6,896 KB
testcase_38 AC 415 ms
6,692 KB
testcase_39 AC 352 ms
6,800 KB
testcase_40 AC 353 ms
6,688 KB
testcase_41 AC 356 ms
6,908 KB
testcase_42 AC 217 ms
6,960 KB
testcase_43 AC 218 ms
6,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, l, r) for (int i = (l); i < (r); i++)
using namespace std;

typedef long long ll;

int main() {
    vector<int> B(1000001, 0);
    rep(i, 2, 1000001) {
        for (int j = 2; j * j <= i; j++) {
            if (i % j == 0) {
                B[i] = B[i / j] + 1;
                break;
            }
        }
        if (B[i] == 0) B[i] = 1;
    }
    int N, A, X = 0;
    cin >> N;
    rep(i, 0, N) {
        cin >> A;
        X ^= B[A];
        //cout << X << " " << B[A] << endl;
    }
    if (X == 0) cout << "black" << endl;
    else cout << "white" << endl;
}
0