답안 #887439

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
887439 2023-12-14T14:29:02 Z MuhammadSaram Languages (IOI10_languages) C++17
34 / 100
5330 ms 178076 KB
#include <bits/stdc++.h>
#include "grader.h"

using namespace std;

map<int,int> exc[56][(1<<16)];
map<int,int> exc1[56];
int cnt[56]={};

void excerpt(int *E)
{
	int gue=0;
	vector<int> ve;
	double sc[56]={};
	for (int i=0;i<99;i++)
	{
		for (int j=0;j<56;j++)
			if (exc[j][E[i]].find(E[i+1])!=exc[j][E[i]].end())
				sc[j]+=(double)exc[j][E[i]][E[i+1]]/(double)cnt[j];
	}
	for (int i=0;i<100;i++)
		for (int j=0;j<56;j++)
		{
			if (exc1[j].find(E[i])!=exc1[j].end())
				sc[j]+=(double)exc1[j][E[i]]/(double)cnt[j]*2;
		}
	for (int i=0;i<56;i++)
		if (sc[i]>sc[gue])
			gue=i;
	int L=language(gue);
	cnt[L]++;
	for (int j=0;j<99;j++)
		exc[L][E[j]][E[j+1]]++;
	for (int j=0;j<100;j++)
		exc1[L][E[j]]++;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5282 ms 178076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 5330 ms 178044 KB Output is partially correct - 33.29%