aliens.cpp:66:8: error: 'll y0' redeclared as different kind of entity
66 | ll x0, y0;
| ^~
In file included from /usr/include/features.h:424,
from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:524,
from /usr/include/c++/9/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:33,
from aliens.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:220:1: note: previous declaration 'double y0(double)'
220 | __MATHCALL (y0,, (_Mdouble_));
| ^~~~~~~~~~
aliens.cpp: In function 'void goLeft()':
aliens.cpp:79:36: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
79 | RE(i,32) if(query(x0-(1ll<<i), y0)) x0 -= 1ll<<i;
| ^~
| |
| double (*)(double) throw () {aka double (*)(double)}
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp: In function 'void goRight()':
aliens.cpp:82:36: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
82 | RE(i,32) if(query(x0+(1ll<<i), y0)) x0 += 1ll<<i;
| ^~
| |
| double (*)(double) throw () {aka double (*)(double)}
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp: In function 'void goUp()':
aliens.cpp:85:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
85 | RE(i,32) if(query(x0, y0-(1ll<<i))) y0 -= 1ll<<i;
| ~~^~~~~~~~~
aliens.cpp:85:29: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp:85:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
85 | RE(i,32) if(query(x0, y0-(1ll<<i))) y0 -= 1ll<<i;
| ~~~^~~~~~~~~
aliens.cpp:85:44: error: assignment of read-only location 'y0'
aliens.cpp: In function 'void goDown()':
aliens.cpp:88:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
88 | RE(i,32) if(query(x0, y0+(1ll<<i))) y0 += 1ll<<i;
| ~~^~~~~~~~~
aliens.cpp:88:29: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp:88:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
88 | RE(i,32) if(query(x0, y0+(1ll<<i))) y0 += 1ll<<i;
| ~~~^~~~~~~~~
aliens.cpp:88:44: error: assignment of read-only location 'y0'
aliens.cpp: In function 'bool checkM(int)':
aliens.cpp:94:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
94 | if(!query(x0+i*m,y0+j*m)) return false;
| ~~^~~~
aliens.cpp:94:28: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp: In function 'void program()':
aliens.cpp:104:21: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'int' [-fpermissive]
104 | int tlX=x0, tlY=y0;
| ^~
| |
| double (*)(double) throw () {aka double (*)(double)}
aliens.cpp:113:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
113 | while(query(x0-m, y0-m)) x0-=m, y0-=m;
| ~~^~
aliens.cpp:113:29: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp:113:43: warning: pointer to a function used in arithmetic [-Wpointer-arith]
113 | while(query(x0-m, y0-m)) x0-=m, y0-=m;
| ~~^~~
aliens.cpp:113:43: error: assignment of read-only location 'y0'
aliens.cpp:114:29: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
114 | while(query(x0-m*2, y0)) x0-=m*2;
| ^~
| |
| double (*)(double) throw () {aka double (*)(double)}
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp:115:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
115 | while(query(x0, y0-m*2)) y0-=m*2;
| ~~^~~~
aliens.cpp:115:27: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
aliens.cpp:68:21: note: initializing argument 2 of 'bool query(ll, ll)'
68 | bool query(ll x, ll y) {
| ~~~^
aliens.cpp:115:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
115 | while(query(x0, y0-m*2)) y0-=m*2;
| ~~^~~~~
aliens.cpp:115:36: error: assignment of read-only location 'y0'
aliens.cpp:121:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
121 | answer(x0+2*m+m/2,y0+2*m+m/2);
| ~~^~~~
aliens.cpp:121:33: warning: pointer to a function used in arithmetic [-Wpointer-arith]
121 | answer(x0+2*m+m/2,y0+2*m+m/2);
| ~~~~~~^~~~
aliens.cpp:121:33: error: invalid conversion from 'double (*)(double) throw ()' {aka 'double (*)(double)'} to 'll' {aka 'long long int'} [-fpermissive]
aliens.cpp:75:22: note: initializing argument 2 of 'void answer(ll, ll)'
75 | void answer(ll x, ll y) {
| ~~~^
aliens.cpp:104:17: warning: unused variable 'tlY' [-Wunused-variable]
104 | int tlX=x0, tlY=y0;
| ^~~
aliens.cpp: In instantiation of 'void IN(T&) [with T = double(double)]':
aliens.cpp:32:64: recursively required from 'void IN(H&, T& ...) [with H = long long int; T = {double(double)}]'
aliens.cpp:32:64: required from 'void IN(H&, T& ...) [with H = long long int; T = {long long int, double(double)}]'
aliens.cpp:100:15: required from here
aliens.cpp:31:38: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double(double)')
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:120:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>
120 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/9/istream:120:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |
| double (*)(double)
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:124:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__ios_type& (*)(std::basic_istream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>; std::basic_istream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]' <near match>
124 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/9/istream:124:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |
| double (*)(double)
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:131:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>
131 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/9/istream:131:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'std::ios_base& (*)(std::ios_base&)' [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |
| double (*)(double)
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:168:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>
168 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/9/istream:168:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: warning: the compiler can assume that the address of 'x' will never be NULL [-Waddress]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
aliens.cpp:31:38: warning: the compiler can assume that the address of 'x' will never be NULL [-Waddress]
aliens.cpp:31:38: error: cannot bind non-const lvalue reference of type 'bool&' to an rvalue of type 'bool'
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:172:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' <near match>
172 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/9/istream:172:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'short int' [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |
| double (*)(double)
aliens.cpp:31:38: error: cannot bind rvalue '(short int)(& x)' to 'short int&'
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:175:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>
175 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/9/istream:175:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'short unsigned int' [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |
| double (*)(double)
aliens.cpp:31:38: error: cannot bind rvalue '(short unsigned int)(& x)' to 'short unsigned int&'
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:179:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' <near match>
179 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/9/istream:179:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'int' [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |
| double (*)(double)
aliens.cpp:31:38: error: cannot bind rvalue '(int)(& x)' to 'int&'
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:182:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>
182 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/9/istream:182:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'unsigned int' [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |
| double (*)(double)
aliens.cpp:31:38: error: cannot bind rvalue '(unsigned int)(& x)' to 'unsigned int&'
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from aliens.cpp:1:
/usr/include/c++/9/istream:186:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]' <near match>
186 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/9/istream:186:7: note: conversion of argument 1 would be ill-formed:
aliens.cpp:31:38: error: invalid conversion from 'double (*)(double)' to 'long int' [-fpermissive]
31 | template<class T> void IN(T& x) {cin >> x;}
| ~~~~^~~~
| |