encoder.cpp:1:1: error: 'vector' does not name a type
vector<int> sts;
^~~~~~
encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:6:6: error: 'vector' was not declared in this scope
vector<int> sts;
^~~~~~
encoder.cpp:6:13: error: expected primary-expression before 'int'
vector<int> sts;
^~~
encoder.cpp:12:21: error: 'sts' was not declared in this scope
if(cnt==6) sts.push_back(i);
^~~
encoder.cpp:16:10: error: 'sts' was not declared in this scope
int X=sts[x], Y=sts[Y];
^~~
encoder.cpp:19:25: error: 'Y' was not declared in this scope
if((X&(1<<j)) && !(Y&(1<<j))) h=j+1;
^
decoder.cpp:1:1: error: 'vector' does not name a type
vector<int> sts;
^~~~~~
decoder.cpp: In function 'int decode(int, int, int)':
decoder.cpp:6:6: error: 'vector' was not declared in this scope
vector<int> sts;
^~~~~~
decoder.cpp:6:13: error: expected primary-expression before 'int'
vector<int> sts;
^~~
decoder.cpp:12:21: error: 'sts' was not declared in this scope
if(cnt==6) sts.push_back(i);
^~~
decoder.cpp:16:12: error: 'sts' was not declared in this scope
return (sts[q]&(1<<(h-1))>0;
^~~
decoder.cpp:16:31: error: expected ')' before ';' token
return (sts[q]&(1<<(h-1))>0;
^