Submission #34074


Source Code Expand

Copy
#include<iostream>
#include<string>

using namespace std;

int main(void)
{
	char E[6],L[6],B,last;
	int cnt=0;

	for(int i=0;i<6;i++){cin>>E[i];}
	cin>>B;
	for(int i=0;i<6;i++){cin>>L[i];}

	for(int i=0;i<6;i++)
	{
		for(int j=0;j<6;j++)
		{
			if(E[i]==L[j]){cnt++;}
		}
	}

	if(cnt==6){cout<<1<<endl;}

	else if(cnt==5)
	{
		for(int i=0;i<6;i++)
		{
			for(int j=0;j<6;j++)
			{
				if(E[i]!=L[j]){last=L[j];}
			}
		}
	}
	if(last==B){cout<<2<<endl;}
	else if(last!=B){cout<<3<<endl;}
	else if(cnt==4){cout<<4<<endl;}
	else if(cnt==3){cout<<5<<endl;}
	else cout<<0<<endl;
}

Submission Info

Submission Time
Task A - 宝くじ
User atcoder_tom
Language C++ (G++ 4.6.4)
Score 0
Code Size 617 Byte
Status WA
Exec Time 34 ms
Memory 896 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 5
WA × 46
Set Name Test Cases
All 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
Case Name Status Exec Time Memory
00_1_01.txt WA 20 ms 776 KB
00_1_02.txt WA 34 ms 780 KB
00_2_01.txt AC 23 ms 844 KB
00_2_02.txt WA 23 ms 732 KB
00_3_01.txt AC 20 ms 764 KB
00_3_02.txt AC 22 ms 788 KB
00_sample_01.txt WA 19 ms 768 KB
00_sample_02.txt WA 19 ms 780 KB
00_sample_03.txt AC 21 ms 784 KB
00_sample_04.txt AC 22 ms 772 KB
00_sample_05.txt WA 19 ms 776 KB
01_rand_00.txt WA 19 ms 764 KB
01_rand_01.txt WA 21 ms 780 KB
01_rand_02.txt WA 21 ms 780 KB
01_rand_03.txt WA 21 ms 772 KB
01_rand_04.txt WA 21 ms 784 KB
01_rand_05.txt WA 24 ms 840 KB
01_rand_06.txt WA 26 ms 780 KB
01_rand_07.txt WA 22 ms 884 KB
01_rand_08.txt WA 21 ms 780 KB
01_rand_09.txt WA 19 ms 772 KB
01_rand_10.txt WA 21 ms 736 KB
01_rand_11.txt WA 21 ms 780 KB
01_rand_12.txt WA 22 ms 780 KB
01_rand_13.txt WA 21 ms 772 KB
01_rand_14.txt WA 20 ms 776 KB
01_rand_15.txt WA 22 ms 788 KB
01_rand_16.txt WA 21 ms 784 KB
01_rand_17.txt WA 22 ms 772 KB
01_rand_18.txt WA 21 ms 724 KB
01_rand_19.txt WA 22 ms 768 KB
01_rand_20.txt WA 21 ms 776 KB
01_rand_21.txt WA 21 ms 816 KB
01_rand_22.txt WA 21 ms 780 KB
01_rand_23.txt WA 21 ms 788 KB
01_rand_24.txt WA 21 ms 776 KB
01_rand_25.txt WA 21 ms 780 KB
01_rand_26.txt WA 21 ms 768 KB
01_rand_27.txt WA 21 ms 736 KB
01_rand_28.txt WA 21 ms 784 KB
01_rand_29.txt WA 21 ms 784 KB
01_rand_30.txt WA 21 ms 776 KB
01_rand_31.txt WA 24 ms 776 KB
01_rand_32.txt WA 21 ms 780 KB
01_rand_33.txt WA 22 ms 780 KB
01_rand_34.txt WA 21 ms 772 KB
01_rand_35.txt WA 21 ms 776 KB
01_rand_36.txt WA 21 ms 776 KB
01_rand_37.txt WA 21 ms 896 KB
01_rand_38.txt WA 21 ms 772 KB
01_rand_39.txt WA 21 ms 780 KB