AtCoder Grand Contest 010

Submission #1575589

Source codeソースコード

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int tmp=1000000007,n,sum=0,i,x;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&x);
		tmp=min(tmp,x);
		sum+=x;
	}
	if(tmp==1)
	{
		sum-=n;
		if(sum%2==1)
			printf("First");
		else
			printf("Second");
	}
	else
	{
		if(sum%tmp%2==1)
		{
			printf("First");
		}
		else
			printf("Second");
	}
	return 0;
}

Submission

Task問題 D - Decrementing
User nameユーザ名 vjudge5
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 WA
Score得点 0
Source lengthソースコード長 419 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:9:16: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
./Main.cpp:12:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&x);
^

Test case

Set

Set name Score得点 / Max score Cases
Sample - sample1.txt,sample2.txt,sample3.txt
All 0 / 1000 sample1.txt,sample2.txt,sample3.txt,in1.txt,in10.txt,in11.txt,in12.txt,in13.txt,in14.txt,in15.txt,in16.txt,in17.txt,in18.txt,in19.txt,in2.txt,in20.txt,in21.txt,in22.txt,in23.txt,in24.txt,in25.txt,in26.txt,in27.txt,in28.txt,in29.txt,in3.txt,in30.txt,in31.txt,in32.txt,in33.txt,in34.txt,in35.txt,in36.txt,in37.txt,in4.txt,in5.txt,in6.txt,in7.txt,in8.txt,in9.txt,sample1.txt,sample2.txt,sample3.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
in1.txt AC 12 ms 256 KB
in10.txt WA
in11.txt AC 12 ms 256 KB
in12.txt WA
in13.txt WA
in14.txt AC 12 ms 256 KB
in15.txt AC 14 ms 256 KB
in16.txt WA
in17.txt AC 12 ms 256 KB
in18.txt WA
in19.txt WA
in2.txt WA
in20.txt WA
in21.txt WA
in22.txt AC 12 ms 256 KB
in23.txt AC 12 ms 256 KB
in24.txt WA
in25.txt AC 12 ms 256 KB
in26.txt AC 12 ms 256 KB
in27.txt AC 12 ms 256 KB
in28.txt AC 12 ms 256 KB
in29.txt AC 12 ms 256 KB
in3.txt AC 12 ms 256 KB
in30.txt WA
in31.txt AC 12 ms 256 KB
in32.txt AC 12 ms 256 KB
in33.txt AC 12 ms 256 KB
in34.txt AC 12 ms 256 KB
in35.txt WA
in36.txt AC 1 ms 256 KB
in37.txt AC 1 ms 256 KB
in4.txt WA
in5.txt AC 12 ms 256 KB
in6.txt WA
in7.txt WA
in8.txt WA
in9.txt WA
sample1.txt AC 1 ms 256 KB
sample2.txt AC 1 ms 256 KB
sample3.txt AC 1 ms 256 KB