# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1996 |
2013-07-19T15:00:09 Z |
gs13105 |
지우개 (GA4_eraser) |
C++ |
|
11 ms |
1276 KB |
#include <stdio.h>
#define d 1000000007
int arr[100001];
int main()
{
int n,mx=0,i;
long long sum1=0,sum2=0,sum3=0,vol;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&arr[i]);
sum1+=arr[i];
sum1%=d;
sum2+=arr[i]*arr[i];
sum2%=d;
sum3+=arr[i]*arr[i]%d*arr[i];
sum3%=d;
}
vol=(sum1*sum1%d*sum1%d-sum3)%d;
for(i=0;i<n;i++)
{
vol+=d-3*arr[i]*arr[i]%d*(sum1-arr[i])%d;
vol%=d;
}
vol/=6;
printf("%lld",vol%d);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1276 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1276 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1276 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1276 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
1276 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
10 ms |
1276 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |