結果
| 問題 |
No.387 ハンコ
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2024-10-13 11:00:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 942 ms / 5,000 ms |
| コード長 | 501 bytes |
| コンパイル時間 | 1,676 ms |
| コンパイル使用メモリ | 172,580 KB |
| 実行使用メモリ | 7,808 KB |
| 最終ジャッジ日時 | 2024-10-13 11:00:53 |
| 合計ジャッジ時間 | 10,360 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+2;
int n;
vector<int> a[N];
bitset<2*N> b,ans,t;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
cin>>n;
int u;
for(int i=0;i<n;i++)
{
cin>>u;
a[u].push_back(i);
}
for(int i=0;i<n;i++)
cin>>u,b[i]=u;
for(int i=0;i<N;i++)
{
if(a[i].size()==0)
continue;
for(auto j:a[i])
t|=b<<j;
ans^=t,t=0;
}
for(int i=0;i<2*n-1;i++)
{
if(ans[i]==0)
cout<<"EVEN"<<endl;
else
cout<<"ODD"<<endl;
}
}
vjudge1