answer.code:12:11: error: conflicting declaration ‘int k’
12 | int n, m, k;
| ^
answer.code:11:4: note: previous declaration as ‘ll k [2000010]’
11 | ll k[N];
| ^
answer.code: In function ‘bool check(ll)’:
answer.code:26:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
26 | return cur <= k;
| ~~~~^~~~
answer.code: In function ‘void solve()’:
answer.code:30:23: error: no match for ‘operator>>’ (operand types are ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} and ‘ll [2000010]’ {aka ‘long long int [2000010]’})
30 | cin >> n >> m >> k;
| ~~~~~~~~~~~~~ ^~ ~
| | |
| | ll [2000010] {aka long long int [2000010]}
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
In file included from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from answer.code:1:
/usr/include/c++/11/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++/11/istream:168:7: note: conversion of argument 1 would be ill-formed:
answer.code:30:26: error: cannot bind non-const lvalue reference of type ‘bool&’ to a value of type ‘ll*’ {aka ‘long long int*’}
30 | cin >> n >> m >> k;
| ^
In file included from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from answer.code:1:
/usr/include/c++/11/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++/11/istream:172:7: note: conversion of argument 1 would be ill-formed:
answer.code:30:26: error: invalid conversion from ‘ll*’ {aka ‘long long int*’} to ‘short int’ [-fpermissive]
30 | cin >> n >> m >> k;
| ^
| |
| ll* {aka long long int*}
answer.code:30:26: error: cannot bind rvalue ‘(short int)((ll*)(& k))’ to ‘short int&’
In file included from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from answer.code:1:
/usr/include/c++/11/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++/11/istream:175:7: note: conversion of argument 1 would be ill-formed:
answer.code:30:26: error: invalid conversion from ‘ll*’ {aka ‘long long int*’} to ‘short unsigned int’ [-fpermissive]
30 | cin >> n >> m >> k;
| ^
| |
| ll* {aka long long int*}
answer.code:30:26: error: cannot bind rvalue ‘(short unsigned int)((ll*)(& k))’ to ‘short unsigned int&’
In file included from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from answer.code:1:
/usr/include/c++/11/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++/11/istream:179:7: note: conversion of argument 1 would be ill-formed:
answer.code:30:26: error: invalid conversion from ‘ll*’ {aka ‘long long int*’} to ‘int’ [-fpermissive]
30 | cin >> n >> m >> k;
| ^
| |
| ll* {aka long long int*}
answer.code:30:26: error: cannot bind rvalue ‘(int)((ll*)(& k))’ to ‘int&’
In file included...