Submission #18831

#TimeUsernameProblemLanguageResultExecution timeMemory
18831ggohLast supper (IOI12_supper)C++98
0 / 100
89 ms5272 KiB
#include "advisor.h" void ComputeAdvice(int *C, int N, int K, int M) { int L[100002]; for(int i=0;i<N;i++)L[i]=-1; for(int i=0;i<N;i++)L[C[i]]=i; for(int i=0;i<K;i++)WriteAdvice((L[i]+1?0:1)); for(int i=0;i<N;i++)WriteAdvice((L[C[i]]-i?0:1)); }
#include "assistant.h" int sz,del,p,T[100002],c[100002]; void Assist(unsigned char *A, int N, int K, int R) { for(int i=0;i<K;i++) { c[i]=1; if(A[i])T[sz++]=i; } for(int i=0;i<N;i++) { p=GetRequest(); if(!c[p]) { PutBack(T[--sz]); c[T[sz]]=0;c[p]=1; } if(A[K+i])T[sz++]=p; } }
#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...