結果
問題 |
No.387 ハンコ
|
ユーザー |
|
提出日時 | 2016-07-02 02:39:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 716 bytes |
コンパイル時間 | 684 ms |
コンパイル使用メモリ | 75,156 KB |
実行使用メモリ | 9,856 KB |
最終ジャッジ日時 | 2024-10-12 01:57:12 |
合計ジャッジ時間 | 4,181 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 RE * 8 |
ソースコード
#include <cstdio> #include <bitset> #include <vector> #include <map> #define repeat(i,n) for (int i = 0; (i) < (n); ++(i)) using namespace std; #define N 5000 #define L (2*N-1) int main() { // input int n; scanf("%d", &n); map<int,vector<int> > a; repeat (i,n) { int it; scanf("%d", &it); a[it].push_back(i); } bitset<L> b; repeat (i,n) { int it; scanf("%d", &it); b[i] = it; } // compute bitset<L> c; for (auto it : a) { bitset<L> d; for (int i : it.second) { d |= b << i; } c ^= d; } // output repeat (i,2*n-1) { printf("%s\n", c[i] ? "ODD" : "EVEN"); } return 0; }