AtCoder Regular Contest 025

Submission #1351903

Source codeソースコード

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <limits.h>	
#define inf INT_MAX
#define INF 9223372036854775807
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)

int in(void){
	int i;scanf("%d",&i);
	return i;
}
long long llin(void){
	long long i;scanf("%lld",&i);
	return i;
}
double din(void){
	double i;scanf("%lf",&i);
	return i;
}
void chin(char s[]){
	scanf("%s",s);
}
void print(int a){
	printf("%d\n",a);
}
void llprint(long long a){
	printf("%lld\n",a);
}
void dprint(double a){
	printf("%.10f\n",a);
}
void print2(int a,int b){
	printf("%d %d\n",a,b);
}
long long max(long long a,long long b){
	return a>b?a:b;
}
long long min(long long a,long long b){
	return a<b?a:b;
}
double dmax(double a,double b){
	return a>b?a:b;
}
int cmp(const void *a,const void *b){
	return *(int *)a-*(int *)b;
}

int main(void){
	int d[7],j[7],i,ans=0;
	rep(i,7){
		d[i]=in();
	}
	rep(i,7){
		j[i]=in();
	}
	rep(i,7){
		ans+=max(d[i],j[i]);
	}
	print(ans);
	return 0;
}

Submission

Task問題 A - ゴールドラッシュ
User nameユーザ名 f_t_ikt
Created time投稿日時
Language言語 C (GCC 5.4.1)
Status状態 AC
Score得点 100
Source lengthソースコード長 1071 Byte
File nameファイル名
Exec time実行時間 1 ms
Memory usageメモリ使用量 128 KB

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

./Main.c: In function ‘in’:
./Main.c:12:8: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
int i;scanf("%d",&i);
^
./Main.c: In function ‘llin’:
./Main.c:16:14: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
long long i;scanf("%lld",&i);
^
./Main.c: In function ‘din’:
./Main.c:20:11: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
double i;scanf("%lf",&i);
^
./Main.c: In function ‘chin’:
./Main.c:24:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",s);
^

Test case

Set

Set name Score得点 / Max score Cases
Sample - subtask0_sample-01.txt,subtask0_sample-02.txt,subtask0_sample-03.txt,subtask0_sample-04.txt
All 100 / 100 subtask0_sample-01.txt,subtask0_sample-02.txt,subtask0_sample-03.txt,subtask0_sample-04.txt,subtask1_01.txt,subtask1_02.txt,subtask1_03.txt,subtask1_04.txt,subtask1_05.txt,subtask1_06.txt,subtask1_07.txt,subtask1_08.txt,subtask1_09.txt,subtask1_10.txt,subtask1_11.txt,subtask1_12.txt,subtask1_13.txt,subtask1_14.txt,subtask1_15.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
subtask0_sample-01.txt AC 1 ms 128 KB
subtask0_sample-02.txt AC 1 ms 128 KB
subtask0_sample-03.txt AC 1 ms 128 KB
subtask0_sample-04.txt AC 1 ms 128 KB
subtask1_01.txt AC 1 ms 128 KB
subtask1_02.txt AC 1 ms 128 KB
subtask1_03.txt AC 1 ms 128 KB
subtask1_04.txt AC 1 ms 128 KB
subtask1_05.txt AC 1 ms 128 KB
subtask1_06.txt AC 1 ms 128 KB
subtask1_07.txt AC 1 ms 128 KB
subtask1_08.txt AC 1 ms 128 KB
subtask1_09.txt AC 1 ms 128 KB
subtask1_10.txt AC 1 ms 128 KB
subtask1_11.txt AC 1 ms 128 KB
subtask1_12.txt AC 1 ms 128 KB
subtask1_13.txt AC 1 ms 128 KB
subtask1_14.txt AC 1 ms 128 KB
subtask1_15.txt AC 1 ms 128 KB