# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
512701 | algorithm16 | Languages (IOI10_languages) | C++14 | 9770 ms | 5368 KiB |
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<iostream>
#include<set>
#include<algorithm>
#include "grader.h"
#include "lang.h"
using namespace std;
typedef long long int llint;
set <llint> s[65],s1;
int cnt[300005];
int cmp(int i) {
int ret=0;
for(set <llint>::iterator it=s1.begin();it!=s1.end();it++) {
cnt[(*it)]+=1;
}
for(set <llint>::iterator it=s[i].begin();it!=s[i].end();it++) {
if(cnt[(*it)]) ret+=1;
}
for(set <llint>::iterator it=s1.begin();it!=s1.end();it++) {
cnt[(*it)]-=1;
}
return ret;
}
void excerpt(int *E) {
s1.clear();
for(int i=0;i<100;i++) {
s1.insert(E[i]);
if(i) s1.insert(E[i-1]+E[i]);
if(i>1) s1.insert(E[i-2]+E[i-1]+E[i]);
}
int mx=0,idx=0;
for(int i=0;i<56;i++) {
if(s[i].size()<=mx) continue;
int cnt1=cmp(i);
if(cnt1>mx) {
mx=cnt1;
idx=i;
}
}
int l=language(idx);
for(set <llint>::iterator it=s1.begin();it!=s1.end();it++) {
s[l].insert(*it);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |