train.cpp: In function 'bool BFS()':
train.cpp:19:5: error: reference to 'left' is ambiguous
19 | left = right = 0;
| ^~~~
In file included from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from train.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1006:3: note: candidates are: 'std::ios_base& std::left(std::ios_base&)'
1006 | left(ios_base& __base)
| ^~~~
train.cpp:14:5: note: 'int left'
14 | int left = 0;
| ^~~~
train.cpp:19:12: error: reference to 'right' is ambiguous
19 | left = right = 0;
| ^~~~~
In file included from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from train.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1014:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
1014 | right(ios_base& __base)
| ^~~~~
train.cpp:15:5: note: 'int right'
15 | int right = 0;
| ^~~~~
train.cpp:26:17: error: reference to 'right' is ambiguous
26 | nxt[right++];
| ^~~~~
In file included from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from train.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1014:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
1014 | right(ios_base& __base)
| ^~~~~
train.cpp:15:5: note: 'int right'
15 | int right = 0;
| ^~~~~
train.cpp:32:12: error: reference to 'left' is ambiguous
32 | while (left < right) {
| ^~~~
In file included from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from train.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1006:3: note: candidates are: 'std::ios_base& std::left(std::ios_base&)'
1006 | left(ios_base& __base)
| ^~~~
train.cpp:14:5: note: 'int left'
14 | int left = 0;
| ^~~~
train.cpp:32:19: error: reference to 'right' is ambiguous
32 | while (left < right) {
| ^~~~~
In file included from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from train.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1014:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
1014 | right(ios_base& __base)
| ^~~~~
train.cpp:15:5: note: 'int right'
15 | int right = 0;
| ^~~~~
train.cpp:33:24: error: reference to 'left' is ambiguous
33 | auto cur = nxt[left++];
| ^~~~
In file included from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from train.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1006:3: note: candidates are: 'std::ios_base& std::left(std::ios_base&)'
1006 | left(ios_base& __base)
| ^~~~
train.cpp:14:5: note: 'int left'
14 | int left = 0;
| ^~~~
train.cpp:40:21: error: reference to 'right' is ambiguous
40 | nxt[right++] = x;
| ^~~~~
In file included from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from train.cpp:1:
/usr/include/c++/10/bits/ios_base.h:1014:3: note: candidates are: 'std::ios_base& std::right(std::ios_base&)'
1014 | right(ios_base& __base)
| ^~~~~
train.cpp:15:5: note: 'int right'
15 | int right = 0;
| ^~~~~