結果

問題 No.1665 quotient replace
ユーザー TKTYITKTYI
提出日時 2021-09-03 21:48:27
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2,531 ms / 3,000 ms
コード長 929 bytes
コンパイル時間 3,771 ms
コンパイル使用メモリ 227,320 KB
実行使用メモリ 11,124 KB
最終ジャッジ日時 2023-08-21 21:12:23
合計ジャッジ時間 104,124 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,036 ms
10,796 KB
testcase_01 AC 2,030 ms
10,780 KB
testcase_02 AC 2,029 ms
10,928 KB
testcase_03 AC 2,039 ms
11,124 KB
testcase_04 AC 2,033 ms
10,756 KB
testcase_05 AC 2,039 ms
10,868 KB
testcase_06 AC 2,045 ms
10,940 KB
testcase_07 AC 2,031 ms
10,868 KB
testcase_08 AC 2,044 ms
10,800 KB
testcase_09 AC 2,043 ms
10,920 KB
testcase_10 AC 2,163 ms
10,880 KB
testcase_11 AC 2,310 ms
10,784 KB
testcase_12 AC 2,059 ms
10,864 KB
testcase_13 AC 2,391 ms
10,816 KB
testcase_14 AC 2,392 ms
10,812 KB
testcase_15 AC 2,390 ms
10,944 KB
testcase_16 AC 2,531 ms
10,996 KB
testcase_17 AC 2,415 ms
10,860 KB
testcase_18 AC 2,037 ms
10,852 KB
testcase_19 AC 2,030 ms
10,812 KB
testcase_20 AC 2,023 ms
10,940 KB
testcase_21 AC 2,033 ms
10,804 KB
testcase_22 AC 2,034 ms
11,056 KB
testcase_23 AC 2,030 ms
10,860 KB
testcase_24 AC 2,062 ms
10,740 KB
testcase_25 AC 2,033 ms
10,868 KB
testcase_26 AC 2,025 ms
11,000 KB
testcase_27 AC 2,032 ms
10,848 KB
testcase_28 AC 2,035 ms
10,872 KB
testcase_29 AC 2,048 ms
10,772 KB
testcase_30 AC 2,203 ms
10,732 KB
testcase_31 AC 2,297 ms
10,780 KB
testcase_32 AC 2,293 ms
10,772 KB
testcase_33 AC 2,125 ms
10,940 KB
testcase_34 AC 2,240 ms
10,816 KB
testcase_35 AC 2,215 ms
10,756 KB
testcase_36 AC 2,231 ms
10,892 KB
testcase_37 AC 2,216 ms
10,924 KB
testcase_38 AC 2,268 ms
10,732 KB
testcase_39 AC 2,188 ms
11,060 KB
testcase_40 AC 2,229 ms
10,904 KB
testcase_41 AC 2,190 ms
10,848 KB
testcase_42 AC 2,032 ms
10,848 KB
testcase_43 AC 2,025 ms
10,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long int ll;
typedef long double ld;
#define FOR(i,l,r) for(ll i=l;i<r;i++)
#define REP(i,n) FOR(i,0,n)
#define RFOR(i,l,r) for(ll i=r-1;i>=l;i--)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define P pair<ll,ll>
#define F first
#define S second
#define BS(A,x) binary_search(ALL(A),x)
#define LB(A,x) (ll)(lower_bound(ALL(A),x)-A.begin())
#define UB(A,x) (ll)(upper_bound(ALL(A),x)-A.begin())
#define COU(A,x) UB(A,x)-LB(A,x)
template<typename T>using min_priority_queue=priority_queue<T,vector<T>,greater<T>>;
using mint=modint1000000007;
signed main(){
  ll N,ans=0;cin>>N;vector<ll>D(1000000);
  REP(i,1000000){
    ll x=i+1,d=2;while(d*d<=x){while(x%d==0){D[i]++;x/=d;}d++;}if(x>1)D[i]++;
  }
  REP(i,N){ll x;cin>>x;ans^=D[x-1];}
  if(ans)cout<<"white"<<endl;else cout<<"black"<<endl;
  return 0;
}
0