Submission #170113

# Submission time Handle Problem Language Result Execution time Memory
170113 2019-12-24T03:56:15 Z Retro3014 Languages (IOI10_languages) C++17
0 / 100
330 ms 992 KB
#include <stdlib.h>
#include <stdio.h>
#include "grader.h"
#include "lang.h"
#include <bits/stdc++.h>

#define all(v) (v).begin(), (v).end()
#define sortv(v) sort(all(v))
#define uniqv(v) (v).erase(unique(all(v)), (v).end())
#define pb push_back
#define FI first
#define SE second
#define lb lower_bound
#define ub upper_bound
#define test 1
#define TEST if(test)

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;

const int MOD = 1000000007; // 998244353
const int INF = 2e9;
const ll INFLL = 1e18;
const int MAX_N = 10000;

#define SZ 100
int idx = 0;

vector<ll> v[MAX_N+10];
int lan[MAX_N+10];
map<ll, pii> mp;

vector<ll> vt;
ll mx;
int mx2;

void check(ll x){
	vt.pb(x);
}

void excerpt(int *E) {
	idx++;
	for(int i=0; i<SZ; i++){
		ll t = (ll)E[i];
		for(int j=1; j<3; j++){
			if(i+j>=SZ)	break;
			t=(t<<16);
			t = t + (ll)E[i+j];
		}
		check(t);
	}
	sort(vt.begin(), vt.end());
	mx = 0; mx2 = 0;
	while(!vt.empty()){
		ll now = vt.back(); vt.pop_back();
		int c = 1;
		while(!vt.empty() && vt.back()==now){
			vt.pop_back(); c++;
		}
		if(c>mx2){
			mx2 = c; mx = now;
		}
	}
	pii p = mp[mx];
	int ask = lan[p.first];
	if(p.second<mx2){
		mp[mx] = {idx, mx2};
	}
	lan[idx] = language(ask);
	cout<<idx<<" "<<ask<<" "<<lan[idx]<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 221 ms 888 KB Hacked.
# Verdict Execution time Memory Grader output
1 Incorrect 330 ms 992 KB Hacked.