제출 #64534

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
645342018-08-04 20:08:42TadijaSebez웜뱃 (IOI13_wombats)C++11
100 / 100
6521 ms228552 KiB
#include "wombats.h"
#include <stdio.h>
const int N=5050;
const int M=2048;
const int H=205;
const int inf=1e9+7;
int min(int a, int b){ return a>b?b:a;}
int max(int a, int b){ return a>b?a:b;}
int n,m,dp[M][H][H],ls[M],rs[M],x[N][M],y[N][M],tsz,root,opt[H];
void Take(int c)
{
int i,j,k,l,r;
for(i=0;i<m;i++) opt[i]=0;
for(i=0;i<m;i++) for(j=0;j<m;j++) dp[c][i][j]=inf;
for(i=m-1;i>-m;i--)
{
for(j=min(m-1,m-i-1);j+min(i,0)>=0;j--)
{
if(j==max(-i,0)) l=0;
else l=opt[j-1];
if(j==min(m-1,m-i-1)) r=m-1;
else r=opt[j];
for(k=l;k<=r;k++)
{
if(dp[c][j][j+i]>dp[ls[c]][j][k]+dp[rs[c]][k][j+i])
{
dp[c][j][j+i]=dp[ls[c]][j][k]+dp[rs[c]][k][j+i];
opt[j]=k;
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
  int res;
      ^~~
wombats.cpp: In function 'void Build(int&, int, int)':
wombats.cpp:57:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid=ss+se>>1;
          ~~^~~
wombats.cpp: In function 'void Upd(int, int, int, int)':
wombats.cpp:69:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid=ss+se>>1;
          ~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...