結果
| 問題 | 
                            No.1665 quotient replace
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-09-03 23:32:11 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,012 bytes | 
| コンパイル時間 | 1,525 ms | 
| コンパイル使用メモリ | 123,416 KB | 
| 最終ジャッジ日時 | 2025-01-24 07:20:01 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 39 TLE * 2 | 
ソースコード
#pragma GCC optimize("Ofast")
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
#include <deque>
#include <stack>
#include <sstream>
#include <utility>
#include <cstring>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n; cin >> n;
    vector<ll> a(n);
    ll k=0;
    for(int i=0;i<n;i++){
        cin >> a[i];
        int sum = 0;
        for(int j=2;j*j<=a[i];j++){
            while(a[i]%j==0){
                sum++;
                a[i]/=j;
            }
        }
        if(a[i]>1)sum++;
        k^=sum;
    }
    if(k){
        cout << "white" << endl;
    }
    else{
        cout << "black" << endl; 
    }
}