제출 #7503

#제출 시각아이디문제언어결과실행 시간메모리
7503gs13105Languages (IOI10_languages)C++98
0 / 100
10111 ms190896 KiB
#include <map> #include <math.h> #include <string.h> #include "grader.h" #include "lang.h" typedef std::map<long long,int> M; M pre[56]; M num; int pre2[65536][56]; int num2[65536]; double now[56]; int q; void excerpt(int *E) { int c,r,mxnum=0,i,j; long long p[98]; double z,mx; ++q; memset(now,0,sizeof(now)); for(i=0;i<98;++i) { p[i]=E[i]+E[i+1]*65536LL+E[i+2]*4294967296LL; c=num[p[i]]; if(c!=0) { for(j=0;j<56;++j) { z=cbrt(pre[j][p[i]]); now[j]+=z*z/c; } } } if(q<=7000) { for(i=0;i<100;++i) { if(num2[E[i]]!=0) { for(j=0;j<56;++j) { z=cbrt(pre2[E[i]][j]); now[j]+=z*z/num2[E[i]]; } } } } mx=now[0]; for(i=1;i<56;++i) { if(now[i]>mx) { mx=now[i]; mxnum=i; } } r=language(mxnum); for(i=0;i<98;++i) { ++num[p[i]]; ++pre[r][p[i]]; } if(q<7000) { for(i=0;i<100;++i) { ++num2[E[i]]; ++pre2[E[i]][r]; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...