제출 #511394

#제출 시각아이디문제언어결과실행 시간메모리
511394600MihneaLanguages (IOI10_languages)C++17
56 / 100
3732 ms1824 KiB
#include <bits/stdc++.h> #include "grader.h" #include "lang.h" using namespace std; const int N = 100; const int L = 56; const int LIMIT = 1; set<vector<int>> words[L]; int score[L]; void excerpt(int *a) { for (int i = 0; i < N; i++) { vector<int> current; for (int len = 1; i + len - 1 < N && len <= LIMIT; len++) { current.push_back(a[i + len - 1]); for (int l = 0; l < L; l++) { score[l] += words[l].count(current); } } } 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; i++) { vector<int> current; for (int len = 1; i + len - 1 < N && len <= LIMIT; len++) { current.push_back(a[i + len - 1]); words[solution].insert(current); } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...