# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
434074 |
2021-06-20T14:42:00 Z |
KoD |
Languages (IOI10_languages) |
C++17 |
|
5555 ms |
9028 KB |
#include <bits/stdc++.h>
#include "grader.h"
#include "lang.h"
#define SZ 100
#define LN 56
#define LT 65536
int has[LN][LT];
std::array<std::map<std::pair<int, int>, int>, LN> pair;
template <class T> using Vec = std::vector<T>;
void excerpt(int *E) {
std::array<long long, LN> point{};
for (int t = 0; t < LN; ++t) {
for (int i = 0; i < SZ; ++i) {
// point[t] += (has[t][i] != 0);
}
for (int i = 0; i < SZ - 1; ++i) {
const auto itr = pair[t].find(std::make_pair(E[i], E[i + 1]));
point[t] += (itr == pair[t].end() ? 0 : 1);
}
}
const int ret = std::max_element(point.begin(), point.end()) - point.begin();
const int type = language(ret);
for (int i = 0; i < SZ; ++i) {
has[type][E[i]] += 1;
}
for (int i = 0; i < SZ - 1; ++i) {
pair[type][{E[i], E[i + 1]}] += 1;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5432 ms |
9028 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
5555 ms |
8920 KB |
Output is partially correct - 74.37% |