#include<cstdio>
int a[100000];
int main()
{
long long ans=0;
int i,j,k,n;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(a[i]<a[j])
{
for(k=0;k<n;k++)
if(a[j]<a[k])
{
ans+=a[i]*a[j]*a[k];
ans%=1000000007;
}
}
}
}
printf("%lld",ans);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1276 KB |
Output is correct |
2 |
Correct |
0 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 |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1276 KB |
Output is correct |
2 |
Correct |
2 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 |
1 ms |
1276 KB |
Output is correct |
10 |
Correct |
0 ms |
1276 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
235 ms |
1276 KB |
Output is correct |
2 |
Correct |
81 ms |
1276 KB |
Output is correct |
3 |
Execution timed out |
1000 ms |
1276 KB |
Program timed out |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
233 ms |
1276 KB |
Output is correct |
2 |
Correct |
58 ms |
1276 KB |
Output is correct |
3 |
Correct |
6 ms |
1276 KB |
Output is correct |
4 |
Correct |
150 ms |
1276 KB |
Output is correct |
5 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
0 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |