# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
17444 |
2015-12-11T15:30:02 Z |
atomzeno |
지우개 (GA4_eraser) |
C++ |
|
15 ms |
1864 KB |
#include<stdio.h>
#define MOD 1000000007
#define MX 100021
long long int A[MX],c1,c2,c3,six=166666668,ans;
int main(){
int n,i;
scanf("%lld",&n);
for(i=0;i<n;i++){
scanf("%lld",&A[i]);
c1=c1+A[i];
c2=c2+(A[i]*A[i]%MOD);
c3=c3+((A[i]*A[i]%MOD)*A[i]%MOD);
c1%=MOD;
c2%=MOD;
c3%=MOD;
}
ans=((c1*c1%MOD)*c1%MOD)+c3+c3-(c1*c2%MOD)-(c1*c2%MOD)-(c1*c2%MOD);
ans=(MOD+ans)%MOD;
ans=(MOD+ans)%MOD;
ans*=six;
ans%=MOD;
printf("%lld",ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1864 KB |
Output is correct |
2 |
Correct |
0 ms |
1864 KB |
Output is correct |
3 |
Correct |
0 ms |
1864 KB |
Output is correct |
4 |
Correct |
0 ms |
1864 KB |
Output is correct |
5 |
Correct |
0 ms |
1864 KB |
Output is correct |
6 |
Correct |
0 ms |
1864 KB |
Output is correct |
7 |
Correct |
0 ms |
1864 KB |
Output is correct |
8 |
Correct |
0 ms |
1864 KB |
Output is correct |
9 |
Correct |
0 ms |
1864 KB |
Output is correct |
10 |
Correct |
0 ms |
1864 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1864 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1864 KB |
Output is correct |
2 |
Correct |
0 ms |
1864 KB |
Output is correct |
3 |
Correct |
0 ms |
1864 KB |
Output is correct |
4 |
Correct |
0 ms |
1864 KB |
Output is correct |
5 |
Correct |
0 ms |
1864 KB |
Output is correct |
6 |
Correct |
0 ms |
1864 KB |
Output is correct |
7 |
Correct |
0 ms |
1864 KB |
Output is correct |
8 |
Correct |
0 ms |
1864 KB |
Output is correct |
9 |
Correct |
0 ms |
1864 KB |
Output is correct |
10 |
Correct |
0 ms |
1864 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1864 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1864 KB |
Output is correct |
2 |
Correct |
0 ms |
1864 KB |
Output is correct |
3 |
Correct |
0 ms |
1864 KB |
Output is correct |
4 |
Correct |
0 ms |
1864 KB |
Output is correct |
5 |
Correct |
0 ms |
1864 KB |
Output is correct |
6 |
Correct |
7 ms |
1864 KB |
Output is correct |
7 |
Correct |
0 ms |
1864 KB |
Output is correct |
8 |
Correct |
15 ms |
1864 KB |
Output is correct |
9 |
Correct |
9 ms |
1864 KB |
Output is correct |
10 |
Correct |
11 ms |
1864 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
1864 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |