結果
| 問題 |
No.387 ハンコ
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2024-04-10 23:56:26 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 913 ms / 5,000 ms |
| コード長 | 751 bytes |
| コンパイル時間 | 3,136 ms |
| コンパイル使用メモリ | 256,148 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-10-02 21:06:22 |
| 合計ジャッジ時間 | 11,006 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
template <class T> using V=vector<T>;
template <class T> using VV=V<V<T>>; //B(n,V<int>(n))
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int n;
cin>>n;
V<int> A(n),B(n);
rep(i,n) cin>>A[i];
rep(i,n) cin>>B[i];
bitset<200000> b,res;
rep(i,n) if(B[i]) b.set(i);
map<int,V<int>> m;
rep(i,n) m[A[i]].push_back(i);
for(auto [a,C]:m){
int c=C.size();
bitset<200000> tmp,d;
rep(i,c){
d=(b<<C[i]);
tmp|=d;
}
res^=tmp;
}
int ans=0;
rep(i,2*n-1){
if(res.test(i)) cout<<"ODD\n";
else cout<<"EVEN\n";
}
return 0;
}
umezo