foo.cc:3:36: error: 'int index' redeclared as different kind of symbol
int n, a[10005], maxn = -0x3f3f3f, index;
^~~~~
In file included from /usr/include/string.h:431:0,
from /usr/include/c++/7/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:48,
from foo.cc:1:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
index (const char *__s, int __c) __THROW
^~~~~
foo.cc: In function 'int main()':
foo.cc:9:25: error: overloaded function with no contextual type information
maxn = a[i]; index = i;
^
foo.cc:12:22: error: overloaded function with no contextual type information
printf("%d\n", index);
^
foo.cc:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
foo.cc:6:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 0; i < n; i++) scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。