adriatic.cpp:19:34: error: 'int y1 [18][18]' redeclared as different kind of symbol
int x1[M+10][M+10], y1[M+10][M+10];
^
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 adriatic.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:251:1: note: previous declaration 'double y1(double)'
__MATHCALL (y1,, (_Mdouble_));
^
adriatic.cpp: In function 'int main()':
adriatic.cpp:72:13: warning: pointer to a function used in arithmetic [-Wpointer-arith]
y1[i][j]=max(q2[i][1], q2[M][j]);
^
adriatic.cpp:72:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
y1[i][j]=max(q2[i][1], q2[M][j]);
^
adriatic.cpp:72:40: error: assignment of read-only location '*(y1 + (((sizetype)i) + ((sizetype)j)))'
y1[i][j]=max(q2[i][1], q2[M][j]);
^
adriatic.cpp:72:40: error: cannot convert 'const int' to 'double(double) throw ()' in assignment
adriatic.cpp:79:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
dp1[i][j]=dp1[max(i, y1[i-1][j+1])][min(j, x1[i-1][j+1])]+numpoint(i, M, 1, j);
^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
adriatic.cpp:79:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]
dp1[i][j]=dp1[max(i, y1[i-1][j+1])][min(j, x1[i-1][j+1])]+numpoint(i, M, 1, j);
^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
adriatic.cpp:79:42: error: no matching function for call to 'max(int&, double (&)(double) throw ())'
dp1[i][j]=dp1[max(i, y1[i-1][j+1])][min(j, x1[i-1][j+1])]+numpoint(i, M, 1, j);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
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 adriatic.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
adriatic.cpp:79:42: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'double(double) throw ()')
dp1[i][j]=dp1[max(i, y1[i-1][j+1])][min(j, x1[i-1][j+1])]+numpoint(i, M, 1, j);
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
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 adriatic.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
adriatic.cpp:79:42: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'double(double) throw ()')
dp1[i][j]=dp1[max(i, y1[i-1][j+1])][min(j, x1[i-1][j+1])]+numpoint(i, M, 1, j);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from adriatic.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
adriatic.cpp:79:42: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
dp1[i][j]=dp1[max(i, y1[i-1][j+1])][min(j, x1[i-1][j+1])]+numpoint(i, M, 1, j);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from adriatic.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
adriatic.cpp:79:42: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
dp1[i][j]=dp1[max(i, y1[i-1][j+1])][min(j, x1[i-1][j+1])]+numpoint(i, M, 1, j);
^
adriatic.cpp:34:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
~~~~~^~~~~~~~~~
adriatic.cpp:35:56: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=1; i<=N; i++) scanf("%d%d", &A[i].y, &A[i].x), B[A[i].y][A[i].x]++;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~