foo.cc: In function 'int main()':
foo.cc:19:18: error: 'maxnum' was not declared in this scope
19 | if(sum > maxnum)
| ^~~~~~
foo.cc:20:27: error: 'maxlayer' was not declared in this scope
20 | maxnum = sum, maxlayer = layer + 1;
| ^~~~~~~~
foo.cc:20:38: error: 'layer' was not declared in this scope
20 | maxnum = sum, maxlayer = layer + 1;
| ^~~~~
foo.cc:23:13: error: 'maxlayer' was not declared in this scope
23 | cout << maxlayer;
| ^~~~~~~~
foo.cc:6:18: warning: unused variable 'mp' [-Wunused-variable]
6 | long long n, mp, cnt = 0, flag = 0;
| ^~
[Hydro](https://hydro.ac)提供评测服务