#include <stdlib.h>
#include <stdio.h>
#include <bits/stdc++.h>
#include "grader.h"
#include "lang.h"
#define SZ 100
using namespace std;
static map<int, int> word_list[56];
bool isInit = false;
void excerpt(int *E) {
if (!isInit) {
for (int i = 0; i <= 55; i++) {
word_list[i] = map<int, int>();
}
isInit = true;
}
int bigram_arr[SZ + 1];
for (int i = 1; i < SZ; i++) {
int bigram = E[i - 1] * 100000 + E[i];
bigram_arr[i - 1] = bigram;
}
int maxs = 0, guess_ans = 0;
for (int i = 0; i <= 55; i++) {
int res = 0;
for (int j = 0; j < SZ; j++) {
int element = bigram_arr[j];
if (word_list[i].count(element) != 0) {
res += word_list[i][element];
}
}
if (maxs < res) {
guess_ans = i;
maxs = res;
}
}
int real_ans = language(guess_ans);
for (int i = 0; i < SZ; i++) {
word_list[real_ans][bigram_arr[i]] += 1;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6757 ms |
5160 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
6860 ms |
4924 KB |
Output is partially correct - 61.26% |