foo.cc:12:9: error: 'INT_MAX' was not declared in this scope
12 | int num=INT_MAX,nn;
| ^~~~~~~
foo.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
1 | #include<iostream>
+++ |+#include <climits>
2 | using namespace std;
foo.cc: In function 'int f(int, int*, int*, int*, int, int&)':
foo.cc:17:25: error: 'nn' was not declared in this scope; did you mean 'n'?
17 | nn+=a[i];
| ^~
| n
foo.cc:21:28: error: 'nn' was not declared in this scope; did you mean 'n'?
21 | if(nn<num)num=nn;
| ^~
| n
foo.cc:26:1: warning: control reaches end of non-void function [-Wreturn-type]
26 | }
| ^
[Hydro](https://hydro.ac)提供评测服务