結果
| 問題 |
No.387 ハンコ
|
| コンテスト | |
| ユーザー |
sigma425
|
| 提出日時 | 2016-07-12 13:42:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 877 ms / 5,000 ms |
| コード長 | 710 bytes |
| コンパイル時間 | 1,376 ms |
| コンパイル使用メモリ | 162,588 KB |
| 実行使用メモリ | 7,936 KB |
| 最終ジャッジ日時 | 2024-10-14 14:28:06 |
| 合計ジャッジ時間 | 9,630 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:17:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
17 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
main.cpp:20:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
20 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
main.cpp:25:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
25 | scanf("%d",&x);
| ~~~~~^~~~~~~~~
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
typedef bitset<200000> BS;
vector<int> vc[100000];
BS ans,is,tmp;
int main(){
int N;
scanf("%d",&N);
rep(i,N){
int x;
scanf("%d",&x);
vc[x-1].pb(i);
}
rep(i,N){
int x;
scanf("%d",&x);
is[i]=x;
}
rep(i,100000) if(vc[i].size()){
tmp.reset();
for(int x:vc[i]) tmp|=is<<x;
ans^=tmp;
}
rep(i,2*N-1){
if(ans[i]) puts("ODD");
else puts("EVEN");
}
}
sigma425