Submission #270911

# Submission time Handle Problem Language Result Execution time Memory
270911 2020-08-18T04:09:36 Z TMJN Languages (IOI10_languages) C++17
0 / 100
10000 ms 101356 KB
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;

int mp[56][66666];
map<long long,int>mpp[56];
int C[56];

void excerpt(int *E) {
	pair<double,int>mx={0,0};
	for(int i=0;i<56;i++){
		if(C[i]==0)continue;
		int c=0;
		for(int j=0;j<100;j++){
			c+=mp[i][E[j]];
		}
		for(int j=0;j<99;j++){
			c+=mpp[i][E[j]*66666+E[j+1]]*3;
		}
		mx=max(mx,{(double)c/C[i],i});
	}
	int l=language(mx.second);
	C[l]++;
	for(int i=0;i<100;i++){
		mp[l][E[i]]++;
	}
	for(int i=0;i<99;i++){
		mpp[l][E[i]*66666+E[i+1]]++;
	}
}
# Verdict Execution time Memory Grader output
1 Execution timed out 10066 ms 93816 KB Time limit exceeded
# Verdict Execution time Memory Grader output
1 Execution timed out 10075 ms 101356 KB Time limit exceeded