foo.cc: In function 'int dfs(int, int, result)':
foo.cc:24:3: error: 'itoa' was not declared in this scope
24 | itoa(now_state, str, 10);
| ^~~~
foo.cc:26:16: error: 'strlen' was not declared in this scope
26 | for (int j = strlen(str) - 1; j >= 0; j--) {
| ^~~~~~
foo.cc:7:1: note: 'strlen' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
6 | #include <stdlib.h>
+++ |+#include <cstring>
7 | using namespace std;
foo.cc:22:7: warning: unused variable 'tmp' [-Wunused-variable]
22 | int tmp = now_state;
| ^~~
foo.cc: In function 'int main()':
foo.cc:51:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
51 | scanf("%d", &tmp);
| ~~~~~^~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务