# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
512734 | Markomafko972 | Languages (IOI10_languages) | C++14 | 0 ms | 0 KiB |
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"
map<int, int> m[60];
set<int> s;
vector<int> v;
void excerpt(int *E) {
s.clear();
v.clear();
for (int i = 0; i < 100; i++) s.insert(E[i]);
for (set<int> :: iterator it = s.begin(); it != s.end(); it++) v.push_back(*it);
int maxi = -1, koji = 0;
for (int i = 0; i < 56; i++) {
int kol = 0;
for (int j = 0; j < v.size(); j++) {
if (m[i][v[j]] > 0) kol++;
}
if (kol > maxi) {
maxi = kol;
koji = i;
}
}
int pravi = language(koji);
for (int i = 0; i < v.size(); i++) m[pravi][v[i]]++;
}