結果

問題 No.1665 quotient replace
ユーザー tko919tko919
提出日時 2021-09-03 23:39:47
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 382 ms / 3,000 ms
コード長 740 bytes
コンパイル時間 3,014 ms
コンパイル使用メモリ 199,620 KB
実行使用メモリ 6,920 KB
最終ジャッジ日時 2023-08-22 01:56:01
合計ジャッジ時間 9,897 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
6,832 KB
testcase_01 AC 33 ms
6,828 KB
testcase_02 AC 33 ms
6,828 KB
testcase_03 AC 35 ms
6,680 KB
testcase_04 AC 33 ms
6,680 KB
testcase_05 AC 34 ms
6,844 KB
testcase_06 AC 36 ms
6,720 KB
testcase_07 AC 34 ms
6,860 KB
testcase_08 AC 35 ms
6,672 KB
testcase_09 AC 42 ms
6,684 KB
testcase_10 AC 146 ms
6,788 KB
testcase_11 AC 287 ms
6,912 KB
testcase_12 AC 60 ms
6,768 KB
testcase_13 AC 382 ms
6,768 KB
testcase_14 AC 360 ms
6,680 KB
testcase_15 AC 343 ms
6,832 KB
testcase_16 AC 358 ms
6,776 KB
testcase_17 AC 351 ms
6,680 KB
testcase_18 AC 32 ms
6,684 KB
testcase_19 AC 33 ms
6,820 KB
testcase_20 AC 33 ms
6,840 KB
testcase_21 AC 33 ms
6,680 KB
testcase_22 AC 33 ms
6,828 KB
testcase_23 AC 34 ms
6,860 KB
testcase_24 AC 33 ms
6,772 KB
testcase_25 AC 33 ms
6,856 KB
testcase_26 AC 34 ms
6,688 KB
testcase_27 AC 35 ms
6,804 KB
testcase_28 AC 42 ms
6,684 KB
testcase_29 AC 54 ms
6,792 KB
testcase_30 AC 188 ms
6,768 KB
testcase_31 AC 276 ms
6,824 KB
testcase_32 AC 264 ms
6,772 KB
testcase_33 AC 120 ms
6,828 KB
testcase_34 AC 223 ms
6,684 KB
testcase_35 AC 195 ms
6,728 KB
testcase_36 AC 222 ms
6,768 KB
testcase_37 AC 197 ms
6,920 KB
testcase_38 AC 226 ms
6,824 KB
testcase_39 AC 174 ms
6,728 KB
testcase_40 AC 164 ms
6,676 KB
testcase_41 AC 172 ms
6,680 KB
testcase_42 AC 33 ms
6,772 KB
testcase_43 AC 33 ms
6,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

//template
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define ALL(v) (v).begin(),(v).end()
using ll=long long int;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
template<typename T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<typename T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}



int main(){
   vector<int> buf(1010101);
   rep(x,1,1010101){
      for(int y=x*2;y<=1000000;y+=x)if(buf[y]==buf[x])buf[y]++;
   }

   int n;
   cin>>n;
   int g=0;
   rep(i,0,n){
      int x;
      cin>>x;
      g^=buf[x];
   }
   if(g)puts("white");
   else puts("black");
   return 0;
}
0