Problem minimise
User SilverClaw
Submission Time 2025-02-11 23:08:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minimise.cpp:4:28: error: ‘int index’ redeclared as different kind of entity
4 | int N, K, x, mini=INT_MAX, index = INT_MAX, cnt = 0;
| ^~~~~
In file included from /usr/include/string.h:432,
from /usr/include/c++/9/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
from minimise.cpp:1:
/usr/include/strings.h:61:1: note: previous declaration ‘const char* index(const char*, int)’
61 | index (const char *__s, int __c) __THROW
| ^~~~~
minimise.cpp: In function ‘int main()’:
minimise.cpp:13:12: error: overloaded function with no contextual type information
13 | index = i;
| ^
minimise.cpp:17:16: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<’
17 | else if(index < K && (N - index) < K){ // Both sides block
| ~~~~~~^~