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<bits/stdc++.h>
#define ll long long
#include "lang.h"
#include "grader.h"
using namespace std;
ll freq[56][70001], nocur[56], spac, cfreq[70001];
ll sq(ll x, ll y) {return (x - y) * (x - y);}
void excerpt(int *e) {
memset(cfreq, 0, sizeof(cfreq));
for(ll i = 0; i < 100; i++) cfreq[e[i]]++;
ll exp = 0;
ll sd = 0;
for(ll i = 0; i < 56; i++) {
ll csd = 0;
for(ll j = 0; j < 100; j++) csd += bool(freq[i][e[j]]);
if(csd > sd) sd = csd, exp = i;
}
ll ca = language(exp);
for(ll i = 0; i < 100; i++) freq[ca][e[i]] += cfreq[e[i]];
nocur[ca]++;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |