This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "grader.h"
#include "lang.h"
#include <iostream>
#include <unordered_map>
using namespace std;
#define SZ 100
typedef long long ll;
int cnt[1 << 6][1 << 16];
unordered_map<ll,int> hcnt[1 << 6];
int vote[1 << 6];
void excerpt(int *E) {
	for (int i = 0; i < 56; i++){
		vote[i] = 0;
		for (int j = 0; j < SZ; j++){
			if (cnt[i][E[j]])
				vote[i]++;
			if (j > 2){
				ll h = E[j] + ((ll)E[j - 1] << 16) + ((ll)E[j - 2] << 32) + ((ll)E[j - 3] << 48);
				if (hcnt[i].count(h))
					vote[i]++;
			}
		}
	}
	int mm = 0;
	int ans = 0;
	for (int i = 0; i < 56; i++){
		if (mm < vote[i]){
			mm = vote[i];
			ans = i;
		}
	}
	int now;
	now = language(ans);
	for (int i = 0; i < SZ; i++){
		cnt[now][E[i]]++;
		if (i > 2){
			ll h = E[i] + ((ll)E[i - 1] << 16) + ((ll)E[i - 2] << 32) + ((ll)E[i - 3] << 48);
			hcnt[now][h]++;
		}
	}
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |