Submission #2532

# Submission time Handle Problem Language Result Execution time Memory
2532 2013-07-23T06:38:17 Z kipa00 지우개 (GA4_eraser) C++
0 / 100
1000 ms 1276 KB
#include <cstdio>
using namespace std;

int N;
int a[100001];

int main() {
    int i, j, k, max = -1;
    int sum = 0;
    long long int s;
    scanf("%d", &N);
    for (i=0; i<N; ++i) {
        int tmp;
        scanf("%d", &tmp);
        ++a[tmp];
        if (max < tmp) {
            max = tmp;
        }
    }
    for (i=1; i<=max; ++i) {
        for (j=i+1; j<=max; ++j) {
            for (k=j+1; k<=max; ++k) {
                s = a[i] * a[j] * a[k] * i * j * k;
                sum += s % 1000000007;
            }
        }
    }
    printf("%d\n", sum);
    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 554 ms 1276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 560 ms 1276 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 -