結果
| 問題 |
No.387 ハンコ
|
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2018-11-08 10:35:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 853 bytes |
| コンパイル時間 | 859 ms |
| コンパイル使用メモリ | 99,144 KB |
| 実行使用メモリ | 13,988 KB |
| 最終ジャッジ日時 | 2024-11-20 20:59:08 |
| 合計ジャッジ時間 | 50,638 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 TLE * 7 |
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <random>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int main()
{
int n;
cin>>n;
vector<int> w[100001];
for(int i=0; i<n; i++){
int a; cin>>a;
w[a].push_back(i);
}
vector<int> v;
for(int i=0; i<n; i++){
int b; cin>>b;
if(b) v.push_back(i);
}
bitset<200001> ans;
for(int i=1; i<=100000; i++){
if(w[i].empty()) continue;
bitset<200001> bs, bs0;
for(auto x:w[i]){
bs[x]=1;
}
for(auto x:v){
bs0|=(bs<<x);
}
ans^=bs0;
}
for(int i=0; i<2*n-1; i++){
if(ans[i]) cout<<"ODD"<<endl;
else cout<<"EVEN"<<endl;
}
return 0;
}
chocorusk