Submission #201766

# Submission time Handle Problem Language Result Execution time Memory
201766 2020-02-12T00:11:55 Z Leonardo_Paes Languages (IOI10_languages) C++17
56 / 100
720 ms 11744 KB
#include <bits/stdc++.h>
#include "lang.h"
#include "grader.h"

using namespace std;

const int maxl = 60, maxn = 67000;

int qtd[maxl], mark[maxn];

map<int,int> m[maxl];

void excerpt(int *e){
    memset(qtd, 0, sizeof qtd);
    memset(mark, 0, sizeof mark);

    int ans = 0;

    for(int i=0; i<100; i++){
        if(mark[e[i]]) continue;
        mark[e[i]]++;
        for(int j=0; j<56; j++){
            if(m[j][e[i]]) qtd[j]++;
            if(qtd[j] > qtd[ans]) ans = j;
        }
    }

    int a = language(ans);

    for(int i=0; i<100; i++){
        m[a][e[i]] = 1;
    }
}
# Verdict Execution time Memory Grader output
1 Correct 720 ms 11744 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 681 ms 11600 KB Output is partially correct - 52.49%