답안 #44986

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
44986 2018-04-10T09:41:14 Z junodeveloper Languages (IOI10_languages) C++14
0 / 100
1105 ms 262148 KB
#include "lang.h"
#include "grader.h"
#include <map>
#include <algorithm>
using namespace std;
typedef unsigned long long ll;
map<ll, int> mp[56];
void excerpt(int* a) {
	int cnt[56] = {0};
	for(int i=0; i<96; i++) {
		ll val = 0;
		for(int j=0; j<4; j++)
			val = val * 65535 + a[i+j] - 1;
		int mx = 0, idx = 0;
		for(int j=0; j<56; j++)
			if(mx < mp[j][val])
			mx = mp[j][val], idx = j;
		cnt[idx]++;
	}
	int ret = max_element(cnt, cnt+56) - cnt;
	int ans = language(ret);
	for(int i=0; i<96; i++) {
		ll val = 0;
		for(int j=0; j<4; j++)
			val = val * 65535 + a[i+j] - 1;
		mp[ans][val]++;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1105 ms 262148 KB Execution killed with signal 9 (could be triggered by violating memory limits)
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1047 ms 262148 KB Execution killed with signal 9 (could be triggered by violating memory limits)