結果
問題 | No.387 ハンコ |
ユーザー | rapurasu |
提出日時 | 2016-08-08 15:06:38 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1,042 ms / 5,000 ms |
コード長 | 675 bytes |
コンパイル時間 | 1,399 ms |
コンパイル使用メモリ | 162,160 KB |
実行使用メモリ | 7,808 KB |
最終ジャッジ日時 | 2024-04-24 22:07:59 |
合計ジャッジ時間 | 10,856 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1,042 ms
7,808 KB |
testcase_01 | AC | 1,003 ms
7,808 KB |
testcase_02 | AC | 836 ms
6,272 KB |
testcase_03 | AC | 828 ms
6,272 KB |
testcase_04 | AC | 320 ms
6,400 KB |
testcase_05 | AC | 625 ms
7,040 KB |
testcase_06 | AC | 839 ms
7,552 KB |
testcase_07 | AC | 830 ms
6,528 KB |
testcase_08 | AC | 835 ms
6,272 KB |
ソースコード
#include<bits/stdc++.h> using namespace std; #define INF 1000000000 #define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++) const int MAX_N=100001; int N; vector<int> V[MAX_N]; bitset<200001>BS; bitset<200001>TS; int main(){ cin>>N; REP(i,N){ int x; cin>>x; V[x].push_back(i); } REP(i,N){ int x; cin>>x; BS[i]=x; } REP(i,100001){ if(V[i].size()){ bitset<200001>T; for(int v=0 ;v<V[i].size();v++){ T |=BS<<V[i][v]; } TS ^=T; } } REP(i,2*N-1){ if(TS[i])cout<<"ODD"<<endl; else cout<<"EVEN"<<endl; } }