# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
897618 | Macker | Languages (IOI10_languages) | C++14 | 3867 ms | 3276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define all(v) v.begin(), v.end()
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx2")
#include "grader.h"
#include "lang.h"
#define SZ 100
#define MXLEN 3
set<ll> v[56][MXLEN];
ll m = 42069;
ll mod = 1e9+7;
class HashedArray{
public:
vector<ll> hsh;
vector<ll> val;
};
ll hsh(vector<int> s){
ll res = 0;
for (int i = 0; i < s.size(); i++) {
res += (s[i] * m) % mod;
res %= mod;
}
return res;
}
void excerpt(int *E) {
vector<int> score(56);
vector<ll> cur[MXLEN];
for (int i = 1; i < MXLEN; i++) {
for (int j = 0; j < 100 - i; j++) {
vector<int> tmp(E + j, E + i + j);
cur[i].push_back(hsh(tmp));
}
}
for (int i = 0; i < 56; i++) {
for (int j = 1; j < MXLEN; j++) {
for (auto &x : cur[j]) {
if(v[i][j].find(x) != v[i][j].end()){
score[i] += j * j * j;
}
}
}
}
int mx = 0;
int mxi = 0;
for (int i = 0; i < 56; i++) {
if(score[i] > mx) {
mx = score[i];
mxi = i;
}
}
int lan = language(mxi);
for (int i = 0; i < MXLEN; i++) {
for (auto &x : cur[i]) {
v[lan][i].insert(x);
}
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |