Submission #24776

# Submission time Handle Problem Language Result Execution time Memory
24776 2017-06-13T17:48:10 Z taehoon1018 사회적 불평등 (TOKI14_social) C
29 / 100
300 ms 1780 KB
#include<stdio.h>
int abs(int x){
	if(x<0)
		return -x;
	else return x;
}
int main(){
	int N,L[100000],I[100000];
	int i,j,temp;
	long sum=0;
	scanf("%d",&N);
	for(i=0;i<N;i++)
		scanf("%d %d",&L[i],&I[i]);
	for(i=0;i<N;i++){
		for(j=i+1;j<N;j++){
			temp=(L[i]-L[j])*(I[i]-I[j]);
			sum+=abs(temp);
		}
	}
	printf("%ld",sum);
}

Compilation message

social.c: In function 'main':
social.c:11:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&N);
  ^
social.c:13:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d",&L[i],&I[i]);
   ^
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1772 KB Output is correct
2 Correct 0 ms 1776 KB Output is correct
3 Correct 0 ms 1776 KB Output is correct
4 Correct 0 ms 1776 KB Output is correct
5 Correct 0 ms 1776 KB Output is correct
6 Correct 0 ms 1776 KB Output is correct
7 Correct 0 ms 1772 KB Output is correct
8 Correct 0 ms 1772 KB Output is correct
9 Correct 9 ms 1772 KB Output is correct
10 Correct 33 ms 1772 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 300 ms 1772 KB Execution timed out
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 300 ms 1776 KB Execution timed out
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 300 ms 1780 KB Execution timed out
2 Halted 0 ms 0 KB -