This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
debug this shit
#include <bits/stdc++.h>
#ifndef LOCAL
#include <fish.h>
#endif // LOCAL
using namespace std;
#define rep(i, l, r) for(int i = (l), _r = (r); i < _r; ++i)
#define FOR(i, l, r) for(int i = (l), _r = (r); i <= _r; ++i)
#define ROF(i, r, l) for(int i = (r), _l = (l); i >= _l; --i)
#define all(v) begin(v), end(v)
#define compact(v) v.erase(unique(all(v)), end(v))
#define sz(v) (int)v.size()
#define dbg(x) "[" #x " = " << (x) << "]"
template<typename T>
bool minimize(T& a, const T& b){
if(a > b) return a = b, true; return false;
}
template<typename T>
bool maximize(T& a, const T& b){
if(a < b) return a = b, true; return false;
}
using ll = long long;
using ld = long double;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
template<typename T> T random_int(T l, T r){ return uniform_int_distribution<T>(l, r)(rng); }
template<typename T> T random_real(T l, T r){ return uniform_real_distribution<T>(l, r)(rng); }
const int MAX = 3e5 + 5;
int n, m;
struct fish{
int x, y, w;
} fishes[MAX];
namespace subtask1{
bool check(){
rep(i, 0, m) if(fishes[i].x& 1) return false;
return true;
}
ll solve(){
ll sum = 0;
rep(i, 0, m){
if((i > 0) || (i < n - 1)){
sum += fishes[i].w;
}
}
return sum;
}
}
namespace subtask2{
bool check(){
for(int i = 0; i < m; ++i){
if(fishes[i].x > 1) return false;
}
return true;
}
ll sum[3][MAX];
ll f[3][MAX], g[3][MAX];
ll solve(){
memset(f, 0, sizeof(f));
memset(g, 0, sizeof(g));
rep(i, 0, m){
sum[fishes[i].x][fishes[i].y] += fishes[i].w;
}
rep(i, 0, 2){
rep(j, 0, n){
sum[i][j] += (j > 0 ? sum[i][j - 1] : 0);
}
}
ll ans = max(sum[0][n - 1], sum[1][n - 1]);
if(n > 2){
rep(i, 0, n){
maximize(ans, sum[1][n - 1] - sum[1][i] + sum[0][i]);
}
}
return ans;
}
}
namespace subtask3{
bool check(){
rep(i, 0, m){
if(fishes[i].y > 0) return false;
}
return true;
}
ll dp[MAX], s[MAX];
ll solve(){
rep(i, 0, m) s[fishes[i].x] = fishes[i].w;
dp[0] = 0;
ll res = 0;
rep(i, 1, n){
dp[i] = max(dp[i - 1], s[i - 1]);
if(i >= 2) maximize(dp[i], dp[i - 2] + s[i - 1]);
if(i >= 3) maximize(dp[i], dp[i - 3] + s[i - 2] + s[i - 1]);
maximize(res, dp[i] + s[i + 1]);
}
return res;
}
}
namespace subtask45{
bool check(){
return n <= 300;
}
ll pref[305][305];
ll solve(){
rep(i, 0, m){
pref[fishes[i].x + 1][fishes[i].y + 1] += fishes[i].w;
}
FOR(i, 1, n){
FOR(j, 1, n){
pref[i][j] += pref[i][j - 1];
}
}
const ll inf = 1e18;
vector<vector<ll>> f(n + 1, vector<ll>(n + 1, -inf));
vector<vector<ll>> g(n + 1, vector<ll>(n + 1, -inf));
/*
let f[c][r] = the maximum sum of weights if we put a pier (c, r) but we don't consider the fishes (c, r') with r' >= r
g[c][r] = the maximum sum of weights if we put a pier (c, r) but we consider the fishes (c, r') with r' >= r
let R[i] the height of pier on column c the we put
consider when R[i - 1] < R[i] -> it contributes to f[c][r]
consider when R[i - 1] > R[i] -> it contributes to g[c][r]
when calculating f[c][r] :
- consider R[i - 2] > R[i - 1] < R[i]
- consider R[i - 2] < R[i - 1] < R[i]
*/
FOR(i, 0, n){
f[1][i] = g[1][i] = 0;
}
FOR(c, 2, n){
FOR(r, 0, n){
if(r == 0){
maximize(f[c][r], g[c - 1][r]);
}
FOR(k, 0, r){
maximize(f[c][r], f[c - 1][k] + pref[c - 1][r] - pref[c - 1][k]);
// cout << dbg(c) << dbg(r) << dbg(f[c - 1][k] + pref[c - 1][r] + pref[c - 1][k]) << '\n';
}
if(c > 2 && r > 0){
FOR(k, 1, n){
maximize(f[c][r], max(f[c - 2][k], g[c - 2][k]) + pref[c - 1][max(r, k)]);
// cout << dbg(c) << dbg(r) << dbg(max(f[c - 2][r], g[c - 2][r]) + pref[c - 1][max(r, k)]) << '\n';
}
}
FOR(k, r, n){
maximize(g[c][r], max(f[c - 1][k], g[c - 1][k]) + pref[c][k] - pref[c][r]);
// cout<< dbg(c) << dbg(r) << dbg(max(f[c - 1][k], g[c - 1][k]) + pref[c][k] - pref[c][r]) << '\n';
}
}
}
ll ans = 0;
FOR(c, 1, n){
FOR(r, 1, n){
maximize(ans, max(f[c][r], g[c][r]) + (c < n ? pref[c + 1][r] : 0));
}
}
// FOR(i, 1, n){
// FOR(j, 1, n){
// cout << pref[j][n - i + 1] << " \n"[j == n];
// }
// }
// cout << "F[r][c] : \n";
// FOR(i, 1, n){
// FOR(j, 1, n){
// cout << f[j][n - i + 1] << " \n"[j == n];
// }
// }
//
// cout << '\n' << "G[r][c] : \n";
// FOR(i, 1, n){
// FOR(j, 1, n){
// cout << g[j][n - i + 1] << " \n"[j == n];
// }
// }
// cerr << "subtask 4, 5 : ";
return ans;
}
}
namespace subtaskFull{
bool check(){
return true;
}
ll solve(){
vector<vector<pair<int, int>>> atColumn(n + 1);
vector<vector<ll>> pref(n + 1);
vector<vector<ll>> f(n + 1);
vector<vector<ll>> g(n + 1);
rep(i, 0, m){
int x = fishes[i].x + 1, y = fishes[i].y + 1, w = fishes[i].w;
atColumn[x].push_back({y, w});
}
const ll inf = 1e18;
FOR(i, 1, n){
atColumn[i].push_back({0, 0});
sort(all(atColumn[i]));
int nFishes = sz(atColumn[i]);
pref[i].resize(nFishes);
f[i].resize(nFishes, -inf);
g[i].resize(nFishes, -inf);
for(int j = 1; j < nFishes; ++j){
pref[i][j] = pref[i][j - 1] + atColumn[i][j].second;
}
}
vector<int> nFishes(n + 1);
FOR(i, 1, n){
nFishes[i] = sz(atColumn[i]);
}
auto sumPrefix = [&](int col, int row){
int pos = upper_bound(all(atColumn[col]), make_pair(row + 1, -1)) - atColumn[col].begin() - 1;
return pref[col][pos];
};
FOR(c, 2, n){
long long mx = -inf;
for(int r = 0, i = 0; r < nFishes[c]; ++r){
if(r == 0){
maximize(f[c][r], g[c - 1][r]);
}
while(i < nFishes[c - 1] && atColumn[c - 1][i].second <= atColumn[c][r].second){
maximize(mx, f[c - 1][i] - pref[c - 1][i]);
++i;
}
maximize(f[c][r], mx + pref[c - 1][i - 1]);
}
if(c > 2){
mx = -inf;
for(int r = nFishes[c] - 1, i = nFishes[c - 2] - 1; r >= 1; --r){
while(i >= 0 && atColumn[c - 2][i].second >= atColumn[c][i].second){
maximize(mx, max(f[c - 2][i], g[c - 2][i]) + sumPrefix(c - 1, atColumn[c - 2][i].second));
--i;
}
maximize(f[c][r], mx);
}
mx = -inf;
for(int r = 1, i = 0; r < nFishes[c]; ++r){
while(i < nFishes[c - 2] && atColumn[c - 2][i].second <= atColumn[c][r].second){
maximize(mx, max(f[c - 2][i], g[c - 2][i]) + sumPrefix(c - 1, atColumn[c - 2][i].second));
++i;
}
maximize(f[c][r], mx);
}
}
mx = -inf;
for(int r = nFishes[c] - 1, i = nFishes[c - 1] - 1; r >= 0; --r){
while(i >= 0 && atColumn[c - 1][i].second >= atColumn[c][r].second){
maximize(mx, max(f[c - 1][i], g[c - 1][i]) + pref[c][i]);
--i;
}
g[c][r] = mx - pref[c][r];
}
}
ll ans = 0;
FOR(c, 1, n){
for(int r = 0; r < nFishes[c]; ++r){
maximize(ans, max(f[c][r], g[c][r]) + (c == n ? 0 : sumPrefix(c + 1, atColumn[c][r].second)));
}
}
return ans;
}
}
ll max_weights(int N, int M, vector<int> X, vector<int> Y, vector<int> W){
n = N;
m = M;
rep(i, 0, M) fishes[i] = {X[i], Y[i], W[i]};
// if(subtask1::check()) return subtask1::solve();
// if(subtask2::check()) return subtask2::solve();
// if(subtask3::check()) return subtask3::solve();
// if(subtask45::check()) return subtask45::solve();
if(subtaskFull::check()) return subtaskFull::solve();
return -1;
}
#ifdef LOCAL
int main(){
freopen("task.inp", "r", stdin);
freopen("task.out", "w", stdout);
int N, M;
cin >> N >> M;
vector<int> X(M), Y(M), W(M);
rep(i, 0, M){
cin >> X[i] >> Y[i] >> W[i];
}
cout << max_weights(N, M, X, Y, W) << '\n';
}
#endif // LOCAL
Compilation message (stderr)
fish.cpp:1:1: error: 'debug' does not name a type; did you mean 'dbg'?
1 | debug this shit
| ^~~~~
| dbg
In file included from /usr/include/c++/10/cmath:43,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/ext/type_traits.h:162:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
162 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/10/ext/type_traits.h:157:5: note: previous declaration 'template<class _Type> bool __gnu_cxx::__is_null_pointer(_Type)'
157 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/10/ext/type_traits.h:162:26: error: 'nullptr_t' is not a member of 'std'
162 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:402:26: error: 'std::size_t' has not been declared
402 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/10/type_traits:403:25: error: '_Size' was not declared in this scope
403 | struct is_array<_Tp[_Size]>
| ^~~~~
/usr/include/c++/10/type_traits:403:31: error: template argument 1 is invalid
403 | struct is_array<_Tp[_Size]>
| ^
/usr/include/c++/10/type_traits:508:42: error: 'nullptr_t' is not a member of 'std'
508 | struct __is_null_pointer_helper<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/10/type_traits:508:51: error: template argument 1 is invalid
508 | struct __is_null_pointer_helper<std::nullptr_t>
| ^
/usr/include/c++/10/type_traits:1351:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1351 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
In file included from /usr/include/stdlib.h:31,
from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:1351:57: error: template argument 1 is invalid
1351 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/10/type_traits:1351:57: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1360:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1360 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
In file included from /usr/include/stdlib.h:31,
from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:1360:46: error: template argument 1 is invalid
1360 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/10/type_traits:1360:46: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1362:26: error: 'std::size_t' has not been declared
1362 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/10/type_traits:1363:21: error: '_Size' was not declared in this scope
1363 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/10/type_traits:1363:27: error: template argument 1 is invalid
1363 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/10/type_traits:1364:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1364 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
In file included from /usr/include/stdlib.h:31,
from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:1364:65: error: template argument 1 is invalid
1364 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/10/type_traits:1364:65: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1368:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1368 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
In file included from /usr/include/stdlib.h:31,
from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:1368:65: error: template argument 1 is invalid
1368 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/10/type_traits:1368:65: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1373:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1373 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
In file included from /usr/include/stdlib.h:31,
from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:1373:46: error: template argument 1 is invalid
1373 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/10/type_traits:1373:46: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1375:42: error: 'std::size_t' has not been declared
1375 | template<typename _Tp, unsigned _Uint, std::size_t _Size>
| ^~~
/usr/include/c++/10/type_traits:1376:23: error: '_Size' was not declared in this scope
1376 | struct extent<_Tp[_Size], _Uint>
| ^~~~~
/usr/include/c++/10/type_traits:1376:36: error: template argument 1 is invalid
1376 | struct extent<_Tp[_Size], _Uint>
| ^
/usr/include/c++/10/type_traits:1377:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1377 | : public integral_constant<std::size_t,
| ^~~~~~
In file included from /usr/include/stdlib.h:31,
from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:1378:24: error: '_Size' was not declared in this scope
1378 | _Uint == 0 ? _Size : extent<_Tp,
| ^~~~~
/usr/include/c++/10/type_traits:1379:28: error: template argument 1 is invalid
1379 | _Uint - 1>::value>
| ^
/usr/include/c++/10/type_traits:1379:28: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1384:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1384 | : public integral_constant<std::size_t,
| ^~~~~~
In file included from /usr/include/stdlib.h:31,
from /usr/include/c++/10/bits/std_abs.h:38,
from /usr/include/c++/10/cmath:47,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/type_traits:1386:31: error: template argument 1 is invalid
1386 | _Uint - 1>::value>
| ^
/usr/include/c++/10/type_traits:1386:31: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1975:26: error: 'std::size_t' has not been declared
1975 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/10/type_traits:1976:30: error: '_Size' was not declared in this scope
1976 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/10/type_traits:1976:36: error: template argument 1 is invalid
1976 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/10/type_traits:1988:26: error: 'std::size_t' has not been declared
1988 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/10/type_traits:1989:35: error: '_Size' was not declared in this scope
1989 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/10/type_traits:1989:41: error: template argument 1 is invalid
1989 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/10/type_traits:2047:12: error: 'std::size_t' has not been declared
2047 | template<std::size_t _Len>
| ^~~
/usr/include/c++/10/type_traits:2052:23: error: '_Len' was not declared in this scope
2052 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/10/type_traits:2067:12: error: 'std::size_t' has not been declared
2067 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/10/type_traits:2067:30: error: 'std::size_t' has not been declared
2067 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/10/type_traits:2068:48: error: '_Len' was not declared in this scope
2068 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/10/type_traits:2068:52: error: template argument 1 is invalid
2068 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/10/type_traits:2073:23: error: '_Len' was not declared in this scope
2073 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/10/type_traits:2074:37: error: '_Align' was not declared in this scope
2074 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/bits/stl_pair.h:92:12: error: 'std::size_t' has not been declared
92 | template<std::size_t...>
| ^~~
/usr/include/c++/10/bits/stl_pair.h:449:36: error: 'std::size_t' has not been declared
449 | template<typename... _Args1, std::size_t... _Indexes1,
| ^~~
/usr/include/c++/10/bits/stl_pair.h:450:36: error: 'std::size_t' has not been declared
450 | typename... _Args2, std::size_t... _Indexes2>
| ^~~
/usr/include/c++/10/bits/stl_pair.h:453:27: error: '_Indexes1' was not declared in this scope
453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:453:36: error: expected parameter pack before '...'
453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~
/usr/include/c++/10/bits/stl_pair.h:453:39: error: template argument 1 is invalid
453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^
/usr/include/c++/10/bits/stl_pair.h:453:55: error: '_Indexes2' was not declared in this scope
453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:453:64: error: expected parameter pack before '...'
453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^~~
/usr/include/c++/10/bits/stl_pair.h:453:67: error: template argument 1 is invalid
453 | _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:65,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/bits/stl_iterator_base_types.h:125:67: error: 'ptrdiff_t' does not name a type
125 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
| ^~~~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:65,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/bits/stl_iterator_base_types.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
+++ |+#include <cstddef>
1 | // Types used in iterator implementation -*- C++ -*-
In file included from /usr/include/c++/10/bits/stl_algobase.h:65,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:3:
/usr/include/c++/10/bits/stl_iterator_base_types.h:214:15: error: 'ptrdiff_t' does not name a type
214 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_iterator_base_types.h:214:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
/usr/include/c++/10/bits/stl_iterator_base_types.h:225:15: error: 'ptrdiff_t' does not name