consul.cpp: In function 'void solve(int)':
consul.cpp:13:16: error: 'kth' was not declared in this scope
13 | freq[x = kth(i)];
| ^~~
consul.cpp:18:9: error: 'say_answer' was not declared in this scope
18 | say_answer(x.first);
| ^~~~~~~~~~
consul.cpp:21:5: error: 'say_answer' was not declared in this scope
21 | say_answer(-1);
| ^~~~~~~~~~
consul.cpp:26:13: error: 'kth' was not declared in this scope
26 | int val=kth(index);
| ^~~
consul.cpp:27:14: error: 'cnt' was not declared in this scope; did you mean 'int'?
27 | int freq=cnt(val);
| ^~~
| int
consul.cpp:29:7: error: 'say_answer' was not declared in this scope
29 | say_answer(val);
| ^~~~~~~~~~
consul.cpp:33:3: error: 'say_answer' was not declared in this scope
33 | say_answer(-1);
| ^~~~~~~~~~