結果
| 問題 |
No.387 ハンコ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-10 16:52:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 898 ms / 5,000 ms |
| コード長 | 847 bytes |
| コンパイル時間 | 1,434 ms |
| コンパイル使用メモリ | 161,028 KB |
| 実行使用メモリ | 7,808 KB |
| 最終ジャッジ日時 | 2024-11-22 00:50:55 |
| 合計ジャッジ時間 | 9,700 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<typename T> using Graph = vector<vector<T>>;
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, a) REP(i, 0, a)
#define EACH(i, a) for (auto i: a)
#define ITR(x, a) for (__typeof(a.begin()) x = a.begin(); x != a.end(); x++)
#define ALL(a) (a.begin()), (a.end())
#define HAS(a, x) (a.find(x) != a.end())
#define endl '\n'
int N;
vector<int> a[100010];
bitset<200020> bs;
bitset<200020> ts;
int main(void) {
cin.tie(0);
ios::sync_with_stdio(false);
cin >> N;
int ai, bi;
rep(i, N) cin >> ai, a[ai].push_back(i);
rep(i, N) cin >> bi, bs[i] = bi;
rep(i, 100010) if (a[i].size()) {
bitset<200020> t;
for (auto v: a[i]) t |= bs << v;
ts ^= t;
}
rep(i, 2*N - 1) printf("%s\n", ts[i] ? "ODD":"EVEN");
return 0;
}