結果
| 問題 |
No.387 ハンコ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-12 16:11:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 519 bytes |
| コンパイル時間 | 363 ms |
| コンパイル使用メモリ | 52,764 KB |
| 最終ジャッジ日時 | 2024-11-14 19:49:40 |
| 合計ジャッジ時間 | 881 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp:9:9: error: ‘vector’ does not name a type
9 | typedef vector<int> V;
| ^~~~~~
main.cpp:12:1: error: ‘V’ does not name a type
12 | V p[100000];
| ^
main.cpp: In function ‘int main()’:
main.cpp:22:17: error: ‘p’ was not declared in this scope
22 | p[--a].push_back(i);
| ^
main.cpp:32:28: error: ‘p’ was not declared in this scope
32 | for(int v: p[i]){
| ^
ソースコード
#include <iostream>
#include <bitset>
#include <algorithm>
#define rep(i, n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef vector<int> V;
int n;
V p[100000];
bitset<200001> b;
bitset<200001> x;
bitset<200001> y;
int main(){
cin >> n;
rep(i, n){
int a;
cin >> a;
p[--a].push_back(i);
}
rep(i, n){
int t;
cin >> t;
b[i] = t;
}
rep(i, 100000){
x = 0;
for(int v: p[i]){
x |= (b << v);
}
y ^= x;
}
rep(i, 2 * n - 1){
cout << (y[i] ? "ODD" : "EVEN") << endl;
}
return 0;
}