結果

問題 No.387 ハンコ
ユーザー PachicobuePachicobue
提出日時 2018-11-12 03:27:15
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 599 bytes
コンパイル時間 2,129 ms
コンパイル使用メモリ 201,964 KB
実行使用メモリ 8,024 KB
最終ジャッジ日時 2023-08-22 12:26:32
合計ジャッジ時間 17,677 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
constexpr uint M = 100000;
constexpr uint L = 2 * M - 1;
std::bitset<L> pos, ans;
std::vector<uint> off[M];
int main()
{
    uint N;
    std::cin >> N;
    for (uint i = 0, a; i < N; i++) { std::cin >> a, off[a - 1].push_back(i); }
    for (uint i = 0, b; i < N; i++) { std::cin >> b, pos |= (b << i); }
    for (uint i = 0; i < M; 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;
}
0