# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
511419 | 600Mihnea | Languages (IOI10_languages) | C++17 | 6613 ms | 18252 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "grader.h"
#include "lang.h"
using namespace std;
typedef long long ll;
const int N = 100;
const int L = 56;
const int B = 65535;
unordered_set<ll> words[L];
int score[L];
bool first = 1;
void excerpt(int *a) {
if (first) {
first = 0;
}
for (int i = 0; i < N - 3; i++) {
ll x = a[i];
ll y = (ll) B * x + a[i + 1];
ll z = (ll) B * y + a[i + 2];
int xx, yy, zz;
for (int l = 0; l < L; l++) {
xx = words[l].count(x);
yy = words[l].count(y);
zz = words[l].count(z);
score[l] += xx;
// score[l] += yy * 5;
score[l] += zz;
}
}
int highest = -1, prediction = -1;
for (int l = 0; l < L; l++) {
if (score[l] > highest) {
highest = score[l];
prediction = l;
}
score[l] = 0;
}
int solution = language(prediction);
for (int i = 0; i < N - 3; i++) {
ll x = a[i];
ll y = (ll) B * x + a[i + 1];
ll z = (ll) B * y + a[i + 2];
for (int l = 0; l < L; l++) {
words[solution].insert(x);
words[solution].insert(y);
words[solution].insert(z);
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |