Submission #481137

#TimeUsernameProblemLanguageResultExecution timeMemory
481137kkkkkkkkParrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include <iostream> using namespace std; int pozicija[8],nova_niza[8]; void encode(int n,int arr[]) { for (int i=0,j=0;i<n;i++,j+=2) arr[i]+=j; for (int i=0;i<n;i++) send(arr[i]); }
#include <iostream> using namespace std; void decode(int n,int l,int arr[]) { for (int i=0;i<l;i++) { pozicija[i]=arr[i]/2; arr[i]%=2; } for (int i=0;i<n;i++) nova_niza[pozicija[i]]=arr[i]; for (int i=0;i<n;i++) output(nova_niza[i]); }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:11:9: error: 'send' was not declared in this scope
   11 |         send(arr[i]);
      |         ^~~~

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:9:9: error: 'pozicija' was not declared in this scope
    9 |         pozicija[i]=arr[i]/2;
      |         ^~~~~~~~
decoder.cpp:13:9: error: 'nova_niza' was not declared in this scope
   13 |         nova_niza[pozicija[i]]=arr[i];
      |         ^~~~~~~~~
decoder.cpp:13:19: error: 'pozicija' was not declared in this scope
   13 |         nova_niza[pozicija[i]]=arr[i];
      |                   ^~~~~~~~
decoder.cpp:15:16: error: 'nova_niza' was not declared in this scope
   15 |         output(nova_niza[i]);
      |                ^~~~~~~~~
decoder.cpp:15:9: error: 'output' was not declared in this scope
   15 |         output(nova_niza[i]);
      |         ^~~~~~