Submission #2280

# Submission time Handle Problem Language Result Execution time Memory
2280 2013-07-21T01:05:26 Z zyslee 지우개 (GA4_eraser) C++
30 / 100
1000 ms 1276 KB
#include<stdio.h>
int d[100001];
int main()
{
	int n, i, j, k, a, max=0;
	long long int z, ans=0;
	scanf("%d", &n);
	for(i=1;i<=n;i++){
		scanf("%d", &a);
		d[a]++;
		if(max<a) max = a;
	}
	for(i=1;i<=max-2;i++){
		if(d[i]==0) continue;
		for(j=i+1;j<max;j++){
			if(d[j]==0) continue;
			for(k=j+1;k<=max;k++){
				z = (k*j)%1000000007;
				z = (z*i)%1000000007;
				z = (z*d[i]*d[j]*d[k])%1000000007;
				ans = (ans+z)%1000000007;
			}
		}
	}
	printf("%lld", ans);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1276 KB Output is correct
2 Correct 1 ms 1276 KB Output is correct
3 Correct 0 ms 1276 KB Output is correct
4 Correct 0 ms 1276 KB Output is correct
5 Correct 0 ms 1276 KB Output is correct
6 Correct 0 ms 1276 KB Output is correct
7 Correct 0 ms 1276 KB Output is correct
8 Correct 1 ms 1276 KB Output is correct
9 Correct 0 ms 1276 KB Output is correct
10 Correct 0 ms 1276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1276 KB Output is correct
2 Correct 1 ms 1276 KB Output is correct
3 Correct 0 ms 1276 KB Output is correct
4 Correct 0 ms 1276 KB Output is correct
5 Correct 0 ms 1276 KB Output is correct
6 Correct 0 ms 1276 KB Output is correct
7 Correct 0 ms 1276 KB Output is correct
8 Correct 0 ms 1276 KB Output is correct
9 Correct 0 ms 1276 KB Output is correct
10 Correct 0 ms 1276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 470 ms 1276 KB Output is correct
2 Correct 242 ms 1276 KB Output is correct
3 Execution timed out 1000 ms 1276 KB Program timed out
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 282 ms 1276 KB Output is correct
2 Correct 155 ms 1276 KB Output is correct
3 Correct 34 ms 1276 KB Output is correct
4 Correct 232 ms 1276 KB Output is correct
5 Correct 801 ms 1276 KB Output is correct
6 Correct 464 ms 1276 KB Output is correct
7 Correct 391 ms 1276 KB Output is correct
8 Correct 85 ms 1276 KB Output is correct
9 Correct 76 ms 1276 KB Output is correct
10 Correct 80 ms 1276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1000 ms 0 KB Program timed out
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1000 ms 0 KB Program timed out
2 Halted 0 ms 0 KB -