結果

問題 No.387 ハンコ
ユーザー 👑 kmjpkmjp
提出日時 2016-07-01 23:26:13
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 887 ms / 5,000 ms
コード長 1,013 bytes
コンパイル時間 1,515 ms
コンパイル使用メモリ 162,804 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2024-04-20 06:11:10
合計ジャッジ時間 9,571 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 883 ms
7,936 KB
testcase_01 AC 887 ms
7,808 KB
testcase_02 AC 709 ms
6,260 KB
testcase_03 AC 710 ms
6,160 KB
testcase_04 AC 287 ms
6,784 KB
testcase_05 AC 558 ms
7,296 KB
testcase_06 AC 741 ms
7,552 KB
testcase_07 AC 716 ms
6,656 KB
testcase_08 AC 718 ms
6,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N;
vector<int> V[101010];
bitset<202020> AS;
bitset<202020> BS;
bitset<202020> TS;

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N;
	FOR(i,N) cin>>x, V[x].push_back(i);
	FOR(i,N) cin>>x, BS[i]=x;
	
	FOR(i,101000) if(V[i].size()) {
		bitset<202020> T;
		FORR(v,V[i]) T |= BS<<v;
		TS ^= T;
	}
	FOR(i,2*N-1) _P("%s\n",TS[i]?"ODD":"EVEN");
	
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n';
	FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	solve(); return 0;
}
0