답안 #1029965

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1029965 2024-07-21T14:55:43 Z Tob Languages (IOI10_languages) C++14
0 / 100
550 ms 262144 KB
#include <bits/stdc++.h>

#include "grader.h"
#include "lang.h"

#define F first
#define S second
#define all(x) x.begin(), x.end()
#define pb push_back
#define FIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)

using namespace std;

typedef long long ll;
typedef pair <int, int> pii;

const int siz = 100, B = 31337, mod = 1e9 + 7;

map <vector <int>, int> m[56];

vector <int> score(vector <int> v) {
	int c = v.size();
	vector <int> res(56, 0);
	for (int i = 0; i < 56; i++) res[i] = m[i][v]*c*c;
	return res;
}

void excerpt(int arr[]) {
	vector <int> res(56, 0);
	for (int i = 0; i < siz; i++) {
		vector <int> v, d;
		for (int j = i; j < min(siz, i+10); j++) {
			v.pb(arr[j]);
			d = score(v);
			for (int k = 0; k < 56; k++) res[k] += d[k];
		}
	}
	int x = 0;
	for (int i = 1; i < 56; i++) if (res[i] > res[x]) x = i;
	int y = language(x);
	for (int i = 0; i < siz; i++) {
		vector <int> v;
		for (int j = i; j < min(siz, i+10); j++) {
			v.pb(arr[j]);
			m[y][v]++;
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 550 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 454 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -