AtCoder Regular Contest 006

Submission #1691756

Source codeソースコード

#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define RREP(i,a,b) for(int i=(a);i>=(b);i--)
typedef long long ll; typedef long double ld;
using namespace std;
const int INF=1e9, MOD=1e9+7, around[]={0,1,1,-1,0,-1,1,0,0};
const ld PI=abs(acos(-1));
int a,b;
set<int> sa,sb;

int main(){
	REP(i,0,6) cin >> a,sa.insert(a);
	cin >> b;
	REP(i,0,6) cin >> a,sb.insert(a);
	
	int c=0;
	for(auto s:sa){
		if(sb.count(s)) c++,sb.erase(s);
	}
	
	if(c==6) cout << 1 << endl;
	else if(c==5 and sb.count(b)) cout << 2 << endl;
	else if(c==5) cout << 3 << endl;
	else if(c==4) cout << 4 << endl;
	else if(c==3) cout << 5 << endl;
	else cout << 0 << endl;
	return 0;
}

Submission

Task問題 A - 宝くじ
User nameユーザ名 ecasdqina
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 AC
Score得点 100
Source lengthソースコード長 706 Byte
File nameファイル名
Exec time実行時間 1 ms
Memory usageメモリ使用量 256 KB

Test case

Set

Set name Score得点 / Max score Cases
All 100 / 100 00_1_01.txt,00_1_02.txt,00_2_01.txt,00_2_02.txt,00_3_01.txt,00_3_02.txt,00_sample_01.txt,00_sample_02.txt,00_sample_03.txt,00_sample_04.txt,00_sample_05.txt,01_rand_00.txt,01_rand_01.txt,01_rand_02.txt,01_rand_03.txt,01_rand_04.txt,01_rand_05.txt,01_rand_06.txt,01_rand_07.txt,01_rand_08.txt,01_rand_09.txt,01_rand_10.txt,01_rand_11.txt,01_rand_12.txt,01_rand_13.txt,01_rand_14.txt,01_rand_15.txt,01_rand_16.txt,01_rand_17.txt,01_rand_18.txt,01_rand_19.txt,01_rand_20.txt,01_rand_21.txt,01_rand_22.txt,01_rand_23.txt,01_rand_24.txt,01_rand_25.txt,01_rand_26.txt,01_rand_27.txt,01_rand_28.txt,01_rand_29.txt,01_rand_30.txt,01_rand_31.txt,01_rand_32.txt,01_rand_33.txt,01_rand_34.txt,01_rand_35.txt,01_rand_36.txt,01_rand_37.txt,01_rand_38.txt,01_rand_39.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00_1_01.txt AC 1 ms 256 KB
00_1_02.txt AC 1 ms 256 KB
00_2_01.txt AC 1 ms 256 KB
00_2_02.txt AC 1 ms 256 KB
00_3_01.txt AC 1 ms 256 KB
00_3_02.txt AC 1 ms 256 KB
00_sample_01.txt AC 1 ms 256 KB
00_sample_02.txt AC 1 ms 256 KB
00_sample_03.txt AC 1 ms 256 KB
00_sample_04.txt AC 1 ms 256 KB
00_sample_05.txt AC 1 ms 256 KB
01_rand_00.txt AC 1 ms 256 KB
01_rand_01.txt AC 1 ms 256 KB
01_rand_02.txt AC 1 ms 256 KB
01_rand_03.txt AC 1 ms 256 KB
01_rand_04.txt AC 1 ms 256 KB
01_rand_05.txt AC 1 ms 256 KB
01_rand_06.txt AC 1 ms 256 KB
01_rand_07.txt AC 1 ms 256 KB
01_rand_08.txt AC 1 ms 256 KB
01_rand_09.txt AC 1 ms 256 KB
01_rand_10.txt AC 1 ms 256 KB
01_rand_11.txt AC 1 ms 256 KB
01_rand_12.txt AC 1 ms 256 KB
01_rand_13.txt AC 1 ms 256 KB
01_rand_14.txt AC 1 ms 256 KB
01_rand_15.txt AC 1 ms 256 KB
01_rand_16.txt AC 1 ms 256 KB
01_rand_17.txt AC 1 ms 256 KB
01_rand_18.txt AC 1 ms 256 KB
01_rand_19.txt AC 1 ms 256 KB
01_rand_20.txt AC 1 ms 256 KB
01_rand_21.txt AC 1 ms 256 KB
01_rand_22.txt AC 1 ms 256 KB
01_rand_23.txt AC 1 ms 256 KB
01_rand_24.txt AC 1 ms 256 KB
01_rand_25.txt AC 1 ms 256 KB
01_rand_26.txt AC 1 ms 256 KB
01_rand_27.txt AC 1 ms 256 KB
01_rand_28.txt AC 1 ms 256 KB
01_rand_29.txt AC 1 ms 256 KB
01_rand_30.txt AC 1 ms 256 KB
01_rand_31.txt AC 1 ms 256 KB
01_rand_32.txt AC 1 ms 256 KB
01_rand_33.txt AC 1 ms 256 KB
01_rand_34.txt AC 1 ms 256 KB
01_rand_35.txt AC 1 ms 256 KB
01_rand_36.txt AC 1 ms 256 KB
01_rand_37.txt AC 1 ms 256 KB
01_rand_38.txt AC 1 ms 256 KB
01_rand_39.txt AC 1 ms 256 KB