feast.cpp: In function 'int solve(LL)':
feast.cpp:33:22: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'LL {aka long long int}'
if(tie(dp[n][0], -cnt[n][0])>tie(dp[n][1], -cnt[n][1]))return cnt[n][0];
^~~~~~~~~~
In file included from /usr/include/c++/7/functional:54:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from feast.cpp:1:
/usr/include/c++/7/tuple:1589:5: note: initializing argument 2 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {long long int, long long int}]'
tie(_Elements&... __args) noexcept
^~~
feast.cpp:33:48: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'LL {aka long long int}'
if(tie(dp[n][0], -cnt[n][0])>tie(dp[n][1], -cnt[n][1]))return cnt[n][0];
^~~~~~~~~~
In file included from /usr/include/c++/7/functional:54:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:71,
from feast.cpp:1:
/usr/include/c++/7/tuple:1589:5: note: initializing argument 2 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {long long int, long long int}]'
tie(_Elements&... __args) noexcept
^~~
feast.cpp: In function 'int main()':
feast.cpp:38:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &k);
~~~~~^~~~~~~~~~~~~~~~~
feast.cpp:40:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &arr[i]);
~~~~~^~~~~~~~~~~~~~~~~