Submission #1007603

#TimeUsernameProblemLanguageResultExecution timeMemory
1007603nomuluunParrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; void send(int a){ } void output(int b){ } void encode(int N, int M[]){ for(int i=0; i<n; i++){ if(M[i]==1)send(i); } } void decode(int N, int L, int X[]){ bool b[N+5]; for(int i=0; i<L; i++){ b[X[i]]=1; } for(int i=0; i<N; i++){ if(b[i]==1)output(1); else output(0); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:10:20: error: 'n' was not declared in this scope
   10 |     for(int i=0; i<n; i++){
      |                    ^

/usr/bin/ld: /tmp/ccs7BmN8.o: in function `main':
grader_decoder.cpp:(.text.startup+0x1ef): undefined reference to `decode(int, int, int*)'
collect2: error: ld returned 1 exit status