key.cpp: In function 'void EnsureKeyInfo(int)':
key.cpp:14:10: error: reference to 'left' is ambiguous
else left[sz[i]]++;
^~~~
key.cpp:5:15: note: candidates are: int left [1005]
int sz[1005], left[1005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from key.cpp:1:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
key.cpp:33:7: error: reference to 'left' is ambiguous
left[sz[i]]--;
^~~~
key.cpp:5:15: note: candidates are: int left [1005]
int sz[1005], left[1005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from key.cpp:1:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
key.cpp:36:8: error: reference to 'left' is ambiguous
if(left[sz[i]] < sz[i]) continue;
^~~~
key.cpp:5:15: note: candidates are: int left [1005]
int sz[1005], left[1005];
^~~~
In file included from /usr/include/c++/7/ios:42:0,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from key.cpp:1:
/usr/include/c++/7/bits/ios_base.h:999:3: note: std::ios_base& std::left(std::ios_base&)
left(ios_base& __base)
^~~~
key.cpp:42:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(cand.size() == sz[i]-1) {
~~~~~~~~~~~~^~~~~~~~~~
key.cpp:59:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(rcand.size() == sz[i]-1) break;
~~~~~~~~~~~~~^~~~~~~~~~