Submission #18831

# Submission time Handle Problem Language Result Execution time Memory
18831 2016-02-15T22:43:55 Z ggoh Last supper (IOI12_supper) C++
0 / 100
89 ms 5272 KB
#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 time Memory Grader output
1 Correct 4 ms 608 KB Output is correct
2 Correct 4 ms 772 KB Output is correct
3 Correct 4 ms 944 KB Output is correct
4 Incorrect 5 ms 1256 KB Error - Putting back a color that is not on the scaffold
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 9 ms 1776 KB Error - Putting back a color that is not on the scaffold
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 56 ms 4156 KB Output is correct
2 Correct 67 ms 4880 KB Output is correct
3 Correct 70 ms 5136 KB Output is correct
4 Correct 69 ms 5216 KB Output is correct
5 Incorrect 64 ms 5244 KB Error - Putting back a color that is not on the scaffold
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 7 ms 5272 KB Output is correct
2 Correct 6 ms 5272 KB Output is correct
3 Incorrect 6 ms 5272 KB Error - Putting back a color that is not on the scaffold
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 67 ms 5272 KB Error - Putting back a color that is not on the scaffold
2 Correct 80 ms 5272 KB Output is correct - 122000 bits used
3 Correct 67 ms 5272 KB Output is correct - 125000 bits used
4 Correct 89 ms 5272 KB Output is correct - 125000 bits used
5 Correct 68 ms 5272 KB Output is correct - 125000 bits used
6 Correct 70 ms 5272 KB Output is correct - 125000 bits used
7 Correct 69 ms 5272 KB Output is correct - 124828 bits used
8 Correct 70 ms 5272 KB Output is correct - 124910 bits used
9 Correct 69 ms 5272 KB Output is correct - 125000 bits used
10 Incorrect 65 ms 5272 KB Error - Putting back a color that is not on the scaffold