# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1215864 | muhammadali_2009 | Knapsack (NOI18_knapsack) | C++20 | 컴파일 에러 | 0 ms | 0 KiB |
#define int long long
#include <bits/stdc++.h>
using namespace std;
int s, n, v, w, k;
vector<pair<int,int>> a[2001];
int dp[2001], ans;
int32_t main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> s >> n;
for(int i = 0; i < n; i++){
cin >> v >> w >> k;
a[w].emplace_back(v, k);
}
for(int i = 1; i <= s; i++){
auto &g = a[i];
sort(g.begin(), g.end(), greater<>());
int idx = 0;
for(int cnt = 0; cnt < s / i; cnt++){
if(idx >= (int)g.size()) break;
for(int j = s; j >= i; j--){
dp[j] = max(dp[j], dp[j - i] + g[idx].first);
ans = max(ans, dp[j]);
}
if(--g[idx].second == 0) idx++;
}
}
cout << ans;
}
컴파일 시 표준 에러 (stderr) 메시지
knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ In file included from /usr/include/c++/11/cmath:42, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/bits/cpp_type_traits.h:242:12: error: redefinition of 'struct std::__is_integer<long long int>' 242 | struct __is_integer<long long> | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/cpp_type_traits.h:214:12: note: previous definition of 'struct std::__is_integer<long long int>' 214 | struct __is_integer<int> | ^~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/cpp_type_traits.h:249:12: error: redefinition of 'struct std::__is_integer<long long unsigned int>' 249 | struct __is_integer<unsigned long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/cpp_type_traits.h:221:12: note: previous definition of 'struct std::__is_integer<long long unsigned int>' 221 | struct __is_integer<unsigned int> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/cmath:43, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/ext/type_traits.h:95:12: error: redefinition of 'struct __gnu_cxx::__add_unsigned<long long int>' 95 | struct __add_unsigned<long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/ext/type_traits.h:87:12: note: previous definition of 'struct __gnu_cxx::__add_unsigned<long long int>' 87 | struct __add_unsigned<int> | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/ext/type_traits.h:138:12: error: redefinition of 'struct __gnu_cxx::__remove_unsigned<long long unsigned int>' 138 | struct __remove_unsigned<unsigned long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/ext/type_traits.h:130:12: note: previous definition of 'struct __gnu_cxx::__remove_unsigned<long long unsigned int>' 130 | struct __remove_unsigned<unsigned int> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/cmath:45, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long' and 'short' specified together 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ In file included from /usr/include/features.h:486, from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:586, from /usr/include/c++/11/cassert:43, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:33, from knapsack.cpp:2: /usr/include/x86_64-linux-gnu/bits/stdlib.h: In function 'char* realpath(const char*, char*)': knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ /usr/include/x86_64-linux-gnu/bits/stdlib.h: In function 'long long int ptsname_r(long long int, char*, size_t)': knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ /usr/include/x86_64-linux-gnu/bits/stdlib.h: In function 'size_t mbstowcs(wchar_t*, const char*, size_t)': knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ /usr/include/x86_64-linux-gnu/bits/stdlib.h: In function 'size_t wcstombs(char*, const wchar_t*, size_t)': knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ In file included from /usr/include/c++/11/cmath:47, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/bits/std_abs.h: At global scope: /usr/include/c++/11/bits/std_abs.h:61:20: error: 'long long int std::abs(long long int)' conflicts with a previous declaration 61 | abs(long long __x) { return __builtin_llabs (__x); } | ^ In file included from /usr/include/c++/11/bits/std_abs.h:38, from /usr/include/c++/11/cmath:47, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/stdlib.h:848:12: note: previous declaration 'long long int abs(long long int)' 848 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; | ^~~ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/cmath: In function 'float std::frexp(float, long long int*)': /usr/include/c++/11/cmath:301:34: error: cannot convert 'long long int*' to 'int*' 301 | { return __builtin_frexpf(__x, __exp); } | ^~~~~ | | | long long int* <built-in>: note: initializing argument 2 of 'float __builtin_frexpf(float, int*)' /usr/include/c++/11/cmath: In function 'long double std::frexp(long double, long long int*)': /usr/include/c++/11/cmath:305:34: error: cannot convert 'long long int*' to 'int*' 305 | { return __builtin_frexpl(__x, __exp); } | ^~~~~ | | | long long int* <built-in>: note: initializing argument 2 of 'long double __builtin_frexpl(long double, int*)' /usr/include/c++/11/cmath: In function 'float std::remquo(float, float, long long int*)': /usr/include/c++/11/cmath:1719:40: error: cannot convert 'long long int*' to 'int*' 1719 | { return __builtin_remquof(__x, __y, __pquo); } | ^~~~~~ | | | long long int* <built-in>: note: initializing argument 3 of 'float __builtin_remquof(float, float, int*)' /usr/include/c++/11/cmath: In function 'long double std::remquo(long double, long double, long long int*)': /usr/include/c++/11/cmath:1723:40: error: cannot convert 'long long int*' to 'int*' 1723 | { return __builtin_remquol(__x, __y, __pquo); } | ^~~~~~ | | | long long int* <built-in>: note: initializing argument 3 of 'long double __builtin_remquol(long double, long double, int*)' In file included from /usr/include/c++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/type_traits: At global scope: /usr/include/c++/11/type_traits:343:12: error: redefinition of 'struct std::__is_integral_helper<long long int>' 343 | struct __is_integral_helper<long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:327:12: note: previous definition of 'struct std::__is_integral_helper<long long int>' 327 | struct __is_integral_helper<int> | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:347:12: error: redefinition of 'struct std::__is_integral_helper<long long unsigned int>' 347 | struct __is_integral_helper<unsigned long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:331:12: note: previous definition of 'struct std::__is_integral_helper<long long unsigned int>' 331 | struct __is_integral_helper<unsigned int> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1711:12: error: redefinition of 'struct std::__make_unsigned<long long int>' 1711 | struct __make_unsigned<long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1703:12: note: previous definition of 'struct std::__make_unsigned<long long int>' 1703 | struct __make_unsigned<int> | ^~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1867:12: error: redefinition of 'struct std::__make_signed<long long unsigned int>' 1867 | struct __make_signed<unsigned long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/type_traits:1859:12: note: previous definition of 'struct std::__make_signed<long long unsigned int>' 1859 | struct __make_signed<unsigned int> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/compare:39, from /usr/include/c++/11/bits/stl_pair.h:65, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/concepts:217:55: error: no matching function for call to 'declval<const std::ranges::__cust_swap::_Swap&>()' 217 | noexcept(noexcept(std::declval<const _Swap&>()(*__e1, *__e2))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from /usr/include/c++/11/bits/move.h:57, from /usr/include/c++/11/bits/stl_pair.h:59, from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/type_traits:2358:10: note: candidate: 'template<class _Tp> decltype (__declval<_Tp>(0)) std::declval()' 2358 | auto declval() noexcept -> decltype(__declval<_Tp>(0)) | ^~~~~~~ /usr/include/c++/11/type_traits:2358:10: note: template argument deduction/substitution failed: /usr/include/c++/11/type_traits: In substitution of 'template<class _Tp> decltype (__declval<_Tp>(0)) std::declval() [with _Tp = const std::ranges::__cust_swap::_Swap&]': /usr/include/c++/11/concepts:217:48: required from here /usr/include/c++/11/type_traits:816:55: error: call of overloaded '__declval<const std::ranges::__cust_swap::_Swap&>(int)' is ambiguous 816 | auto declval() noexcept -> decltype(__declval<_Tp>(0)); | ~~~~~~~~~~~~~~^~~ /usr/include/c++/11/type_traits:808:5: note: candidate: '_Up std::__declval(long long int) [with _Tp = const std::ranges::__cust_swap::_Swap&; _Up = const std::ranges::__cust_swap::_Swap&]' 808 | __declval(int); | ^~~~~~~~~ /usr/include/c++/11/type_traits:812:5: note: candidate: '_Tp std::__declval(long int) [with _Tp = const std::ranges::__cust_swap::_Swap&]' 812 | __declval(long); | ^~~~~~~~~ /usr/include/c++/11/compare: In member function 'constexpr auto std::compare_three_way::operator()(_Tp&&, _Up&&) const': knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ /usr/include/c++/11/bits/ranges_cmp.h: In member function 'constexpr bool std::ranges::less::operator()(_Tp&&, _Up&&) const': knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ knapsack.cpp:1:18: error: 'long long long' is too long for GCC 1 | #define int long long | ^~~~ In file included from /usr/include/c++/11/bits/stl_iterator.h:82, from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/new: At global scope: /usr/include/c++/11/new:89:27: error: different underlying type in enum 'enum class std::align_val_t' 89 | enum class align_val_t: size_t {}; | ^~~~~~ <built-in>: note: previous definition here /usr/include/c++/11/new:126:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 126 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/11/new:128:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 128 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/11/new:140:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 140 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/new:142:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 142 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/new:149:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 149 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/11/new:151:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 151 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/11/new:157:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 157 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/11/new:159:26: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 159 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/11/new:174:33: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 174 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/new:176:33: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive] 176 | _GLIBCXX_NODISCARD inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ In file included from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/bits/stl_algobase.h:1012:3: error: redefinition of 'constexpr long long int std::__size_to_integer(long long int)' 1012 | __size_to_integer(long long __n) { return __n; } | ^~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_algobase.h:1004:3: note: 'constexpr long long int std::__size_to_integer(long long int)' previously defined here 1004 | __size_to_integer(int __n) { return __n; } | ^~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_algobase.h: In static member function 'static constexpr long long int std::__lexicographical_compare<_BoolType>::__3way(_II1, _II1, _II2, _II2)': knapsack.cpp:1:13: error: expected primary-expression before 'long' 1 | #define int long long | ^~~~ knapsack.cpp:1:13: error: expected ';' before 'long' knapsack.cpp:1:13: error: expected primary-expression before 'long' In file included from /usr/include/c++/11/bits/specfun.h:45, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/bits/stl_algobase.h: At global scope: /usr/include/c++/11/bits/stl_algobase.h:1522:3: error: redefinition of 'constexpr long long int std::__lg(long long int)' 1522 | __lg(long long __n) | ^~~~ /usr/include/c++/11/bits/stl_algobase.h:1506:3: note: 'constexpr long long int std::__lg(long long int)' previously defined here 1506 | __lg(int __n) | ^~~~ In file included from /usr/include/c++/11/bits/specfun.h:46, from /usr/include/c++/11/cmath:1935, from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41, from knapsack.cpp:2: /usr/include/c++/11/limits:1339:12: error: redefinition of 'struct std::numeric_limits<long long int>' 1339 | struct numeric_limits<long long> | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/limits:1060:12: note: pre