foo.cc: In function 'void init()':
foo.cc:23:4: error: 'scanf' was not declared in this scope
23 | scanf("%d", &N);
| ^~~~~
foo.cc: In function 'void dpCal()':
foo.cc:58:4: error: 'printf' was not declared in this scope
58 | printf("第一行 %d\n", N - len);
| ^~~~~~
foo.cc:5:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
4 | #include <algorithm>
+++ |+#include <cstdio>
5 | using namespace std;
foo.cc: In function 'void stepCal()':
foo.cc:84:4: error: 'printf' was not declared in this scope
84 | printf("第二行 %d\n", g[N]);
| ^~~~~~
foo.cc:84:4: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
[Hydro](https://hydro.ac)提供评测服务