encoder.cpp:2:1: error: 'vector' does not name a type
2 | vector<int>adj[1001];
| ^~~~~~
encoder.cpp: In function 'void reset(int, int)':
encoder.cpp:9:9: error: 'adj' was not declared in this scope
9 | adj[i].clear();
| ^~~
encoder.cpp:10:48: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
10 | for(int j = 0; j < h; j++) dis[i][j] = 1e18;
| ^~~~
encoder.cpp: In function 'void encode(int, int, int, int*, int*)':
encoder.cpp:27:9: error: 'adj' was not declared in this scope
27 | adj[a[i]].push_back(b[i]);
| ^~~
encoder.cpp:33:9: error: 'set' was not declared in this scope; did you mean 'reset'?
33 | set<pair<int,int>>bfs;
| ^~~
| reset
encoder.cpp:33:13: error: 'pair' was not declared in this scope
33 | set<pair<int,int>>bfs;
| ^~~~
encoder.cpp:33:18: error: expected primary-expression before 'int'
33 | set<pair<int,int>>bfs;
| ^~~
encoder.cpp:34:9: error: 'bfs' was not declared in this scope
34 | bfs.insert({0,i});
| ^~~
encoder.cpp:39:24: error: 'adj' was not declared in this scope
39 | for(auto s:adj[x.second]){
| ^~~
decoder.cpp: In function 'int decode(int, int)':
decoder.cpp:16:26: warning: self-comparison always evaluates to false [-Wtautological-compare]
16 | for(int j = 0; j < j; j++){
| ~ ^ ~
decoder.cpp:18:36: error: 'decode_bit' was not declared in this scope; did you mean 'decode'?
18 | dis[i][j] += (1 << decode_bit());
| ^~~~~~~~~~
| decode
decoder.cpp:25:13: error: 'hops' was not declared in this scope
25 | hops(j,i,dis[i][j]);
| ^~~~
decoder.cpp:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
28 | }
| ^