結果
問題 |
No.387 ハンコ
|
ユーザー |
|
提出日時 | 2018-11-12 03:22:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 649 bytes |
コンパイル時間 | 2,305 ms |
コンパイル使用メモリ | 198,664 KB |
最終ジャッジ日時 | 2025-01-06 16:26:13 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 6 RE * 3 |
ソースコード
#include <bits/stdc++.h> #define show(x) std::cerr << #x << " = " << x << std::endl constexpr uint L = 199999; int main() { uint N; std::cin >> N; std::vector<std::vector<uint>> off(N); for (uint i = 0, a; i < N; i++) { std::cin >> a, off[a - 1].push_back(i); } std::bitset<L> pos, ans; for (uint i = 0, b; i < N; i++) { std::cin >> b, pos |= (b << i); } for (uint i = 0; i < N; i++) { std::bitset<L> mask; for (const uint o : off[i]) { mask |= (pos << o); } ans ^= mask; } for (uint i = 0; i < 2 * N - 1; i++) { std::cout << (ans.test(i) ? "ODD" : "EVEN") << std::endl; } return 0; }