This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdlib.h>
#include <stdio.h>
#include "grader.h"
#include "lang.h"
#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
inline bool maximise(T1 &x, T2 y) {
if (x < y) { x = y; return true; }
return false;
}
const int LEN = 100;
const int NUM_LANG = 56;
set<int> alphabets[NUM_LANG];
void excerpt(int *txt) {
int best = -1, lang = -1;
for (int x = 0; x < NUM_LANG; x++) {
int cnt = 0;
for (int i = 0; i < LEN; i++)
if (alphabets[x].count(txt[i]))
cnt++;
if (maximise(best, cnt))
lang = x;
}
int ans = language(lang);
for (int i = 0; i < LEN; i++)
alphabets[ans].insert(txt[i]);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |