Submission #2161

# Submission time Handle Problem Language Result Execution time Memory
2161 2013-07-20T06:12:01 Z jwvg0425 지우개 (GA4_eraser) C++
22 / 100
1000 ms 2448 KB
#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include<vector>
using namespace std;

#define MOD 1000000007
int n;
long long int a[100000];
long long int v,s[100000];

int main()
{
	int i,j,k;
	scanf("%d",&n);
	for(i=0;i<n;i++)scanf("%lld",&a[i]);
	sort(&a[0],&a[n]);
	for(i=0;i<n-2;i++)
	{
		for(j=i+1;j<n-1;j++)
		{
			for(k=j+1;k<n;k++)
			{
				v=(v+(a[i]*a[j]*a[k]))%MOD;
			}
		}
	}
	printf("%lld",v);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2448 KB Output is correct
2 Correct 0 ms 2448 KB Output is correct
3 Correct 0 ms 2448 KB Output is correct
4 Correct 0 ms 2448 KB Output is correct
5 Correct 0 ms 2448 KB Output is correct
6 Correct 0 ms 2448 KB Output is correct
7 Correct 0 ms 2448 KB Output is correct
8 Correct 0 ms 2448 KB Output is correct
9 Correct 0 ms 2448 KB Output is correct
10 Correct 0 ms 2448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2448 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 102 ms 2448 KB Output is correct
2 Correct 35 ms 2448 KB Output is correct
3 Correct 505 ms 2448 KB Output is correct
4 Correct 348 ms 2448 KB Output is correct
5 Correct 525 ms 2448 KB Output is correct
6 Correct 329 ms 2448 KB Output is correct
7 Correct 367 ms 2448 KB Output is correct
8 Correct 0 ms 2448 KB Output is correct
9 Correct 0 ms 2448 KB Output is correct
10 Correct 494 ms 2448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 101 ms 2448 KB Output isn't correct
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 -
# Verdict Execution time Memory Grader output
1 Execution timed out 1000 ms 0 KB Program timed out
2 Halted 0 ms 0 KB -