plahte.cpp:27:16: error: 'int y1 [80004]' redeclared as different kind of symbol
int x1[N], y1[N], x2[N], y2[N];
^
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533,
from /usr/include/c++/7/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
from plahte.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: previous declaration 'double y1(double)'
__MATHCALL (y1,, (_Mdouble_));
^
plahte.cpp: In function 'void dfs(int)':
plahte.cpp:74:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < a[x].size(); ++i)
~~^~~~~~~~~~~~~
plahte.cpp: In function 'int main()':
plahte.cpp:90:40: warning: pointer to a function used in arithmetic [-Wpointer-arith]
scanf("%d%d%d%d", &x1[i], &y1[i], &x2[i], &y2[i]);
^
plahte.cpp:90:57: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'double (*)(double) noexcept' [-Wformat=]
scanf("%d%d%d%d", &x1[i], &y1[i], &x2[i], &y2[i]);
~~~~~~ ^
plahte.cpp:99:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
vv.push_back(y1[i]);
^
plahte.cpp:99:27: error: no matching function for call to 'push_back(double (&)(double) noexcept)'
vv.push_back(y1[i]);
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/functional:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from plahte.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int] <near match>
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: conversion of argument 1 would be ill-formed:
plahte.cpp:99:26: error: invalid conversion from 'double (*)(double) noexcept' to 'std::vector<int>::value_type {aka int}' [-fpermissive]
vv.push_back(y1[i]);
~~~~^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/functional:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from plahte.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int] <near match>
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: conversion of argument 1 would be ill-formed:
plahte.cpp:99:26: error: invalid conversion from 'double (*)(double) noexcept' to 'std::vector<int>::value_type {aka int}' [-fpermissive]
vv.push_back(y1[i]);
~~~~^
plahte.cpp:105:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < vv.size(); ++i)
~~^~~~~~~~~~~
plahte.cpp:112:13: warning: pointer to a function used in arithmetic [-Wpointer-arith]
y1[i] = mp[y1[i]];
^
plahte.cpp:112:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
y1[i] = mp[y1[i]];
^
plahte.cpp:112:19: error: ambiguous overload for 'operator[]' (operand types are 'std::map<int, int>' and 'double(double) noexcept')
y1[i] = mp[y1[i]];
^
In file included from /usr/include/c++/7/map:61:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:81,
from plahte.cpp:1:
/usr/include/c++/7/bits/stl_map.h:484:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] <near match>
operator[](const key_type& __k)
^~~~~~~~
/usr/include/c++/7/bits/stl_map.h:484:7: note: conversion of argument 1 would be ill-formed:
plahte.cpp:112:24: error: invalid conversion from 'double (*)(double) noexcept' to 'std::map<int, int>::key_type {aka int}' [-fpermissive]
y1[i] = mp[y1[i]];
~~~~^
In file included from /usr/include/c++/7/map:61:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:81,
from plahte.cpp:1:
/usr/include/c++/7/bits/stl_map.h:504:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int] <near match>
operator[](key_type&& __k)
^~~~~~~~
/usr/include/c++/7/bits/stl_map.h:504:7: note: conversion of argument 1 would be ill-formed:
plahte.cpp:112:24: error: invalid conversion from 'double (*)(double) noexcept' to 'std::map<int, int>::key_type {aka int}' [-fpermissive]
y1[i] = mp[y1[i]];
~~~~^
plahte.cpp:129:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii = 0; ii < v.size(); ++ii)
~~~^~~~~~~~~~
plahte.cpp:135:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
p[i] = qry(1, z, y1[i], 1);
^
plahte.cpp:135:34: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
p[i] = qry(1, z, y1[i], 1);
~~~~^
plahte.cpp:54:5: note: initializing argument 3 of 'int qry(int, int, int, int)'
int qry(int tl, int tr, int x, int pos)
^~~
plahte.cpp:136:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
ubd(1, z, y1[i], y2[i], i, 1);
^
plahte.cpp:136:27: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
ubd(1, z, y1[i], y2[i], i, 1);
~~~~^
plahte.cpp:40:6: note: initializing argument 3 of 'void ubd(int, int, int, int, int, int)'
void ubd(int tl, int tr, int l, int r, int y, int pos)
^~~
plahte.cpp:144:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
ubd(1, z, y1[i], y2[i], p[i], 1);
^
plahte.cpp:144:27: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
ubd(1, z, y1[i], y2[i], p[i], 1);
~~~~^
plahte.cpp:40:6: note: initializing argument 3 of 'void ubd(int, int, int, int, int, int)'
void ubd(int tl, int tr, int l, int r, int y, int pos)
^~~
plahte.cpp:88:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~
plahte.cpp:90:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d%d", &x1[i], &y1[i], &x2[i], &y2[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
plahte.cpp:92:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &x[i], &y[i], &g[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~