| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1329907 | boclobanchat | Languages (IOI10_languages) | C++20 | 2730 ms | 237496 KiB |
#include<bits/stdc++.h>
using namespace std;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
int Rand(int l,int r) { return uniform_int_distribution<int>(l,r)(rng); }
#include "grader.h"
#include "lang.h"
#define SZ 100
const int mod=1453223;
const int base=69677;
pair< bool,pair<bool,bool> > mp[56][mod+5];
long long f[56],pw[56];
void excerpt(int *E)
{
pw[0]=10,pw[1]=11,pw[2]=17,pw[3]=37,pw[4]=101;
long long mx=-1,pos=0;
for(int i=0;i<=55;i++) f[i]=0;
for(int j=0;j<100;j++)
{
int enc=0;
for(int k=j;k<=j+3&&k<100;k++)
{
enc=(1LL*base*enc+E[k]+67)%mod;
for(int i=0;i<=55;i++)
{
pair< bool,pair<bool,bool> > res=mp[i][enc];
int t=((int)res.first*4+(int)res.second.first*2+res.second.second);
if(t) f[i]+=pw[t-1];
}
}
}
vector<int> vp;
for(int i=0;i<=55;i++) if(mx<f[i]) mx=f[i],vp={i};
else if(mx==f[i]) vp.push_back(i);
int ans=language(vp[Rand(0,vp.size()-1)]);
for(int j=0;j<100;j++)
{
int enc=0;
for(int k=j;k<=j+3&&k<100;k++)
{
enc=(1LL*base*enc+E[k]+67)%mod;
mp[ans][enc]=max(mp[ans][enc],(pair< bool,pair<bool,bool> >){(k-j+1)/4,{(k-j+1)/2%2,(k-j+1)%2}});
}
}
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
