# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
522210 | sean617 | Languages (IOI10_languages) | C++98 | 6240 ms | 25664 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 "grader.h"
#include "lang.h"
#include <algorithm>
#include <set>
using namespace std;
typedef unsigned long long ll;
ll l, M = (1LL << 16), M2 = (1LL << 32), e[10005];
bool v[58][100000];
set<ll> v2[58];
ll fnum(ll p) {
ll t1, t2, t;
t1 = e[p - 3] * M + e[p - 2];
t2 = e[p - 1] * M + e[p];
t = t1 * M2 + t2;
return t;
}
void excerpt(int *E) {
ll i, j, t, num, ans = 0, x, mx = 0, mx2 = 0, cnt, cnt2;
l = 100;
for (i = 0; i < l; i++) e[i] = E[i];
for (x =0; x < 56; x++) {
cnt = 0;
cnt2 = 0;
for (i = 0; i < l; i++) {
if (i >= 3 && v2[x].count(fnum(i)) == 1) cnt++;
cnt2 += v[x][e[i]];
}
cnt += cnt2;
if (cnt > mx) {
mx = cnt;
ans = x;
}
}
ans = language(ans);
for (i = 0; i < l; i++) {
if (i >= 3) v2[ans].insert(fnum(i));
v[ans][e[i]] = 1;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |