Submission #900282

#TimeUsernameProblemLanguageResultExecution timeMemory
900282Faisal_SaqibParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#pragma once #include <map> #include <iostream> #include "parrotslib.h" using namespace std; void encode(int n, int m[]) { for(int i=0;i<n;i++) { for(int j=0;j<8;j++) { if((m[i]&(1<<j))) { int l=0; for(int p=2;p>=0;p--) { l*=2; l+=(((j>>p)&1)); } for(int p=4;p>=0;p--) { l*=2; l+=((i>>p)&1); } send(l); } } } }
#pragma once #include <map> #include <iostream> #include "parrotslib.h" using namespace std; void decode(int n, int l, int x[]) { map<int,int> cnt; for(int i=0;i<l;i++) { cnt[x[i]]++; } for(int i=0;i<n;i++) { int an=0; for(int j=0;j<8;j++) { int l=0; for(int p=2;p>=0;p--) { l*=2; l+=(((j>>p)&1)); } for(int p=4;p>=0;p--) { l*=2; l+=((i>>p)&1); } if(cnt.find(l)!=cnt.end()) { an+=(1<<j); } } output(an); } }

Compilation message (stderr)

encoder.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
encoder.cpp:4:10: fatal error: parrotslib.h: No such file or directory
    4 | #include "parrotslib.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.

decoder.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
decoder.cpp:4:10: fatal error: parrotslib.h: No such file or directory
    4 | #include "parrotslib.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.