結果

問題 No.1665 quotient replace
ユーザー kotatsugame
提出日時 2021-09-03 21:32:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 361 ms / 3,000 ms
コード長 299 bytes
コンパイル時間 797 ms
コンパイル使用メモリ 65,272 KB
実行使用メモリ 15,812 KB
最終ジャッジ日時 2024-12-15 10:25:44
合計ジャッジ時間 9,297 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 41
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-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