結果

問題 No.1665 quotient replace
ユーザー kotatsugamekotatsugame
提出日時 2021-09-03 21:32:59
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 396 ms / 3,000 ms
コード長 299 bytes
コンパイル時間 549 ms
コンパイル使用メモリ 64,512 KB
実行使用メモリ 15,936 KB
最終ジャッジ日時 2023-08-21 20:00:09
合計ジャッジ時間 10,078 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
15,636 KB
testcase_01 AC 66 ms
15,804 KB
testcase_02 AC 65 ms
15,760 KB
testcase_03 AC 65 ms
15,804 KB
testcase_04 AC 65 ms
15,624 KB
testcase_05 AC 64 ms
15,664 KB
testcase_06 AC 68 ms
15,696 KB
testcase_07 AC 66 ms
15,664 KB
testcase_08 AC 67 ms
15,680 KB
testcase_09 AC 76 ms
15,808 KB
testcase_10 AC 178 ms
15,632 KB
testcase_11 AC 315 ms
15,624 KB
testcase_12 AC 94 ms
15,672 KB
testcase_13 AC 396 ms
15,680 KB
testcase_14 AC 392 ms
15,632 KB
testcase_15 AC 393 ms
15,912 KB
testcase_16 AC 393 ms
15,692 KB
testcase_17 AC 395 ms
15,644 KB
testcase_18 AC 66 ms
15,808 KB
testcase_19 AC 65 ms
15,756 KB
testcase_20 AC 66 ms
15,640 KB
testcase_21 AC 69 ms
15,752 KB
testcase_22 AC 69 ms
15,672 KB
testcase_23 AC 68 ms
15,668 KB
testcase_24 AC 68 ms
15,644 KB
testcase_25 AC 69 ms
15,616 KB
testcase_26 AC 70 ms
15,668 KB
testcase_27 AC 71 ms
15,804 KB
testcase_28 AC 80 ms
15,636 KB
testcase_29 AC 90 ms
15,648 KB
testcase_30 AC 241 ms
15,688 KB
testcase_31 AC 317 ms
15,692 KB
testcase_32 AC 306 ms
15,616 KB
testcase_33 AC 158 ms
15,808 KB
testcase_34 AC 259 ms
15,632 KB
testcase_35 AC 239 ms
15,668 KB
testcase_36 AC 250 ms
15,936 KB
testcase_37 AC 233 ms
15,732 KB
testcase_38 AC 267 ms
15,636 KB
testcase_39 AC 204 ms
15,616 KB
testcase_40 AC 208 ms
15,668 KB
testcase_41 AC 206 ms
15,620 KB
testcase_42 AC 67 ms
15,812 KB
testcase_43 AC 68 ms
15,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:5:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    5 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
long isp[1<<20];
int X[1<<20];
main()
{
	for(int i=1;i<1<<20;i++)
	{
		while(isp[i]>>X[i]&1)X[i]++;
		for(int j=i+i;j<1<<20;j+=i)isp[j]|=1LL<<X[i];
	}
	int N;
	cin>>N;
	int x=0;
	for(;N--;)
	{
		int A;cin>>A;
		x^=X[A];
	}
	cout<<(x?"white":"black")<<endl;
}
0