Submission #2620

# Submission time Handle Problem Language Result Execution time Memory
2620 2013-07-27T23:36:44 Z pull601 지우개 (GA4_eraser) C++
0 / 100
0 ms 262144 KB
#include <stdio.h>

#include <stdlib.h>

int d[100000001];

int kk[100000001];

int main()

{

    long long num=0;

    int i,j,k,max=0,n,m;

    scanf("%d",&n);

    for(i=1;i<=n;i++){

        scanf("%d",&m);

        if(max<m) max=m;

        d[m]+=1;

    }

    for(i=1;i<=max;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++){

                if(d[k]==0)continue;

                num=num+i*k*j*d[i]*d[k]*d[j];

            }

        }

   }

	printf("%d",num%1000000007);

    return 0;

}
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 0 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 0 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 0 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 0 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 0 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Memory limit exceeded 0 ms 262144 KB Memory limit exceeded
2 Halted 0 ms 0 KB -