Submission #15764

# Submission time Handle Problem Language Result Execution time Memory
15764 2015-07-21T14:15:47 Z ainta Languages (IOI10_languages) C++
86 / 100
1224 ms 180260 KB
#include <stdlib.h>
#include <stdio.h>
#include <algorithm>
#include <map>
using namespace std;

#include "grader.h"
#include "lang.h"

#define SZ 100

int Map[56][1000007];

void excerpt(int *E) {
    int i, j, C[56], M = 0, x;
    long long t;
    for(i=0;i<56;i++)C[i]=0;
    for(i=0;i<98;i++){
        t = 0;
        t *= 65536; t += E[i];
        t *= 65536; t += E[i+1];
        t *= 65536; t += E[i+2];
        t %= 1000007;
        for(j=0;j<56;j++){
            C[j] += Map[j][t];
        }
    }
    x = 0;
    for(i=0;i<56;i++){
        if(M < C[i])M=C[i], x = i;
    }
    x = language(x);
    for(i=0;i<98;i++){
        t = 0;
        t *= 65536; t += E[i];
        t *= 65536; t += E[i+1];
        t *= 65536; t += E[i+2];
        t %= 1000007;
        Map[x][t]++;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1149 ms 180196 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 1224 ms 180260 KB Output is partially correct - 79.36%