Submission #33663


Source Code Expand

Copy
#include <stdio.h>

int main(void)
{
	int e[6],l[6],b,cnt=0,i,j;
	
	scanf("%d %d %d %d %d %d",&e[0],&e[1],&e[2],&e[3],&e[4],&e[5]);
	scanf("%d",&b);
	scanf("%d %d %d %d %d %d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5]);

	for(j=0;j<6;j++){
		for(i=0;i<6;i++){
			if(e[j]==l[i])
				cnt++;
		}
	}
	
	if(cnt==5 && e[0]==b)
		cnt=7;
	else if(cnt==5 && e[1]==b)
		cnt=7;
	else if(cnt==5 && e[2]==b)
		cnt=7;
	else if(cnt==5 && e[3]==b)
		cnt=7;
	else if(cnt==5 && e[4]==b)
		cnt=7;
	else if(cnt==5 && e[5]==b)
		cnt=7;
	else if(cnt==5)
		cnt=4;
		
	if(cnt==6)
		printf("1\n");
	else if(cnt==7)
		printf("2\n");
	else if(cnt==5)
		printf("3\n");
	else if(cnt==4)
		printf("4\n");
	else if(cnt==3)
		printf("5\n");
	else
		printf("0\n");
	
	return 0;
}

Submission Info

Submission Time
Task A - 宝くじ
User ulito
Language C (GCC 4.4.7)
Score 0
Code Size 786 Byte
Status WA
Exec Time 21 ms
Memory 828 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:7: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
./Main.c:8: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
./Main.c:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 44
WA × 7
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 AC 21 ms 680 KB
00_1_02.txt AC 20 ms 660 KB
00_2_01.txt WA 20 ms 684 KB
00_2_02.txt WA 19 ms 660 KB
00_3_01.txt WA 20 ms 668 KB
00_3_02.txt WA 19 ms 660 KB
00_sample_01.txt AC 20 ms 664 KB
00_sample_02.txt AC 20 ms 660 KB
00_sample_03.txt WA 20 ms 676 KB
00_sample_04.txt WA 20 ms 672 KB
00_sample_05.txt AC 20 ms 684 KB
01_rand_00.txt AC 20 ms 664 KB
01_rand_01.txt AC 20 ms 656 KB
01_rand_02.txt AC 20 ms 688 KB
01_rand_03.txt AC 19 ms 664 KB
01_rand_04.txt AC 19 ms 708 KB
01_rand_05.txt AC 20 ms 680 KB
01_rand_06.txt AC 20 ms 688 KB
01_rand_07.txt AC 20 ms 660 KB
01_rand_08.txt AC 20 ms 664 KB
01_rand_09.txt AC 20 ms 688 KB
01_rand_10.txt AC 20 ms 684 KB
01_rand_11.txt AC 20 ms 680 KB
01_rand_12.txt AC 20 ms 676 KB
01_rand_13.txt AC 20 ms 692 KB
01_rand_14.txt AC 20 ms 660 KB
01_rand_15.txt AC 19 ms 660 KB
01_rand_16.txt AC 20 ms 676 KB
01_rand_17.txt AC 19 ms 664 KB
01_rand_18.txt AC 19 ms 656 KB
01_rand_19.txt AC 19 ms 680 KB
01_rand_20.txt AC 21 ms 680 KB
01_rand_21.txt AC 20 ms 676 KB
01_rand_22.txt AC 20 ms 676 KB
01_rand_23.txt AC 19 ms 688 KB
01_rand_24.txt AC 20 ms 664 KB
01_rand_25.txt AC 18 ms 656 KB
01_rand_26.txt AC 18 ms 676 KB
01_rand_27.txt AC 21 ms 664 KB
01_rand_28.txt AC 20 ms 668 KB
01_rand_29.txt AC 19 ms 668 KB
01_rand_30.txt AC 20 ms 672 KB
01_rand_31.txt AC 20 ms 828 KB
01_rand_32.txt AC 20 ms 676 KB
01_rand_33.txt AC 21 ms 664 KB
01_rand_34.txt WA 19 ms 684 KB
01_rand_35.txt AC 20 ms 668 KB
01_rand_36.txt AC 20 ms 684 KB
01_rand_37.txt AC 19 ms 672 KB
01_rand_38.txt AC 20 ms 656 KB
01_rand_39.txt AC 20 ms 688 KB