結果
| 問題 | No.387 ハンコ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-11 21:15:50 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 455 ms / 5,000 ms |
| + 78µs | |
| コード長 | 547 bytes |
| 記録 | |
| コンパイル時間 | 926 ms |
| コンパイル使用メモリ | 185,316 KB |
| 実行使用メモリ | 8,448 KB |
| 最終ジャッジ日時 | 2026-09-14 06:11:30 |
| 合計ジャッジ時間 | 6,957 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
# include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 100010;
ll n;
vector <ll> col[N];
bitset <N << 1> use, ans;
int main()
{
scanf("%lld", &n);
for (int i = 0, a; i < n; i++) scanf("%d", &a), col[a].push_back(i);
for (int i = 0, b; i < n; i++) scanf("%lld", &b), use[i] = b;
for (int i = 0; i < N; i++)
{
if (col[i].empty()) continue;
bitset <N << 1> tmp;
for (auto x : col[i]) tmp |= (use << x);
ans ^= tmp;
}
for (int i = 0; i < (n << 1) - 1; i++) printf(ans[i] ? "ODD\n" : "EVEN\n");
return 0;
}