이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "grader.h"
#include "lang.h"
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define pb push_back
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
const int siz = 100, le = 1;
const int C = 1e6*le + 7;
map <char, int> m[C];
map <vector <int>, int> key;
void score(int x, int c, vector <int>& res) {
for (auto y : m[x]) res[(int)y.F] = y.S*c*c;
}
void excerpt(int arr[]) {
vector <int> res(56, 0);
for (int i = 0; i < siz; i++) {
vector <int> v;
for (int j = i; j < min(siz, i+10); j++) {
v.pb(arr[j]);
if (key.find(v) == key.end()) key[v] = key.size();
score(key[v], j-i+1, res);
}
}
int x = 0;
for (int i = 1; i < 56; i++) if (res[i] > res[x]) x = i;
char y = language(x);
for (int i = 0; i < siz; i++) {
vector <int> v;
for (int j = i; j < min(siz, i+10); j++) {
v.pb(arr[j]);
m[key[v]][y]++;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |