제출 #380816

#제출 시각아이디문제언어결과실행 시간메모리
380816ponytail수열 (APIO14_sequence)C++17
컴파일 에러
0 ms0 KiB
#pragma GCC optimization ("unroll-loops") #pragma GCC target ("avx2") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include "bits/stdc++.h" using namespace std; #ifdef ONLINE_JUDGE #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> OST; #endif #define int long long #define double long double #define mp make_pair #define fi first #define se second #define pb push_back #define all(a) a.begin(),a.end() const int MOD = 1000000007; const int MOD2 = 998244353; const int BIG = 1197423052705914509LL; mt19937 rng((int) std::chrono::steady_clock::now().time_since_epoch().count()); const int MAXN = 1e5 + 10; const int NO_OPERATION = 69420420420LL; const int is_query = -BIG; struct line { int m, b; mutable function<const line*()> succ; bool operator<(const line& rhs) const { if (rhs.b != is_query) return m < rhs.m; const line* s = succ(); if (!s) return 0; int x = rhs.m; return b - s->b < (s->m - m) * x; } }; struct dynamic_hull : public multiset<line> { const int inf = BIG; bool bad(iterator y) { auto z = next(y); if (y == begin()) { if (z == end()) return 0; return y->m == z->m && y->b <= z->b; } auto x = prev(y); if (z == end()) return y->m == x->m && y->b <= x->b; int v1 = (x->b - y->b); if (y->m == x->m) v1 = x->b > y->b ? inf : -inf; else v1 /= (y->m - x->m); int v2 = (y->b - z->b); if (z->m == y->m) v2 = y->b > z->b ? inf : -inf; else v2 /= (z->m - y->m); return v1 >= v2; } void insert_line(int m, int b) { auto y = insert({m,b}); y->succ = [=] { return next(y) == end() ? 0 : &*next(y); }; if (bad(y)) { erase(y); return; } while (next(y) != end() && bad(next(y))) erase(next(y)); while (y != begin() && bad(prev(y))) erase(prev(y)); } int eval(int x) { auto l = *lower_bound((line) { x, is_query }); return l.m * x + l.b; } }; struct auxiliary_tree{ int n; vector<int>ori[MAXN]; vector<int>storelatest; int tin[MAXN], tout[MAXN], dep[MAXN], cor[MAXN]; bool imp[MAXN]; int run=0; vector<int>euler; vector<vector<pair<int,int> > >lca_table; int lef[MAXN], rig[MAXN]; void dfs(int node,int prev,int de){ dep[node]=de; tin[node]=++run; cor[tin[node]]=node; euler.pb(node); for(int i=0;i<ori[node].size();i++){ if(ori[node][i]!=prev){ dfs(ori[node][i],node,de+1); euler.pb(node); } } tout[node]=++run; } void find_all_lcas(){ int k=log2(2*n-1); lca_table.resize(k+1); for(int i=0;i<k+1;i++){ lca_table[i].resize(2*n-1); } for(int i=0;i<2*n-1;i++){ lca_table[0][i]=mp(dep[euler[i]],euler[i]); } for(int i=1;i<=k;i++){ for(int j=0;j<2*n-1;j++){ if(j+(1<<(i-1))>=2*n-1)continue; if(lca_table[i-1][j].fi<lca_table[i-1][j+(1<<(i-1))].fi){ lca_table[i][j].fi=lca_table[i-1][j].fi; lca_table[i][j].se=lca_table[i-1][j].se; } else{ lca_table[i][j].fi=lca_table[i-1][j+(1<<(i-1))].fi; lca_table[i][j].se=lca_table[i-1][j+(1<<(i-1))].se; } } } for(int i=0;i<MAXN;i++) lef[i]=-1; for(int i=0;i<2*n-1;i++){ if(lef[euler[i]]==-1){ lef[euler[i]]=i; } rig[euler[i]]=i; } } bool isParent(int u,int v){ return tin[u]<tin[v] && tout[v]<tout[u]; } public: vector<int>adj[MAXN]; int root; int lcadep(int x,int y){ if(lef[x]>rig[y]){ swap(x,y); } int k=log2(rig[y]-lef[x]+1); return min(lca_table[k][lef[x]].fi,lca_table[k][rig[y]-(1<<k)+1].fi); } int lcaidx(int x,int y){ if(lef[x]>rig[y]){ swap(x,y); } int k=log2(rig[y]-lef[x]+1); if(lca_table[k][lef[x]].fi<lca_table[k][rig[y]-(1<<k)+1].fi){ return lca_table[k][lef[x]].se; } else{ return lca_table[k][rig[y]-(1<<k)+1].se; } } void base(int x,int rt,vector<int>y[]){ n=x; for(int i=1;i<=n;i++){ ori[i]=y[i]; } dfs(rt,-1,0); find_all_lcas(); } void build(vector<int>g){ for(int i=0;i<g.size();i++){ g[i]=tin[g[i]]; } sort(all(g)); for(int i=0;i<g.size();i++){ g[i]=cor[g[i]]; } int k=g.size(); for(int i=0;i<k-1;i++){ g.pb(lcaidx(g[i],g[i+1])); } for(int i=0;i<g.size();i++){ g[i]=tin[g[i]]; } sort(all(g)); for(int i=0;i<g.size();i++){ g[i]=cor[g[i]]; } g.erase(unique(all(g)),g.end()); for(int i=0;i<g.size();i++){ imp[g[i]]=1; storelatest.pb(g[i]); } stack<int>vert; vert.push(g[0]); for(int i=1;i<g.size();i++){ int u=g[i]; while(vert.size()>1 && isParent(vert.top(),u)==0){ int sto=vert.top(); vert.pop(); adj[vert.top()].pb(sto); } vert.push(u); } while(vert.size()>1){ int sto=vert.top(); vert.pop(); adj[vert.top()].pb(sto); } root=vert.top(); } void clear(){ for(int i=0;i<storelatest.size();i++){ imp[storelatest[i]]=0; adj[storelatest[i]].clear(); } storelatest.clear(); } }; struct custom_hash{ static uint64_t splitmix64(uint64_t x){ x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049bb133111eb; return x ^ (x >> 31); } size_t operator()(uint64_t a) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); return splitmix64(a + FIXED_RANDOM); } template<class T> size_t operator()(T a) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); hash<T> x; return splitmix64(x(a) + FIXED_RANDOM); } template<class T, class H> size_t operator()(pair<T, H> a) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); hash<T> x; hash<H> y; return splitmix64(x(a.f) * 37 + y(a.s) + FIXED_RANDOM); } }; template<class T, class H>using umap=unordered_map<T,H,custom_hash>; int a[MAXN], ps[MAXN], dp[210][MAXN]; int n; int s(int j,int k){ return ps[k]-ps[j-1]; } double m(int i,int k,int l){ double numer=dp[i-1][l]-ps[n]*ps[l]-ps[l]*ps[l]-dp[i-1][k]+ps[n]*ps[k]+ps[k]*ps[k]; double denom=ps[k]-ps[l]; if(denom==0) denom=1e-10; return numer/denom; } void solve(int test_case){ int k; cin >> n >> k; for(int i=1;i<=n;i++){ cin >> a[i]; ps[i]=ps[i-1]+a[i]; } k++; for(int i=0;i<=k;i++){ for(int j=0;j<=n;j++){ dp[i][j]=-1e9; } } for(int i=1;i<=n;i++){ dp[1][i]=ps[i]*(ps[n]-ps[i]); } for(int i=2;i<=k;i++){ deque<int>d; d.push_back(i-1); for(int j=i;j<=n;j++){ while(d.size()>1 && m(i,d[0],d[1])<2*ps[j]){ d.pop_front(); } dp[i][j]=dp[i-1][d[0]]+2*ps[j]*ps[d[0]]-ps[n]*ps[d[0]]-ps[d[0]]*ps[d[0]]+ps[j]*ps[n]-ps[j]*ps[j]; while(d.size()>1 && m(i,d[d.size()-2],d[d.size()-1])>m(i,d[d.size()-1],j)){ d.pop_back(); } d.push_back(j); } } cout << dp[k][n]/2 << "\n"; int I=k, J=n; for(int i=k-1;i>=1;i--){ for(int j=J-1;j>=1;j--){ if(dp[I][J]==dp[i][j]+s(j+1,J)*(ps[n]-s(j+1,J))){ cout << j << " "; I--, J=j; break; } } }cout << "\n"; } int32_t main(){ time_t t=clock(); srand(time(NULL)); ios::sync_with_stdio(0); cin.tie(0); int T=1;//cin >> T; int test_case=1; while(T--){ solve(test_case); test_case++; } cerr<<"Program terminated successfully\n"; t=clock()-t; cerr<<"Time used: "<<fixed<<setprecision(3)<<(double)(t*1.0/CLOCKS_PER_SEC)<<" seconds\n"; } /* 27 9 3 1 4 1 5 9 2 6 5 0 0 0 0 0 0 0 0 0 3 1 4 1 5 9 2 6 5 Me: 207 272 512 567 812 1127 1175 1271 1296 1296 1296 1296 1296 1296 1296 1296 1296 1296 1287 1280 1232 1215 1100 767 671 335 0 -1000000000 278 544 607 902 1379 1463 1667 1782 1782 1782 1782 1782 1782 1782 1782 1782 1782 1827 1838 1862 1863 1838 1667 1607 1379 1134 -1000000000 -1000000000 550 615 942 1469 1573 1859 2134 2134 2134 2134 2134 2134 2134 2134 2134 2134 2275 2318 2470 2503 2638 2755 2759 2723 2638 -1000000000 -1000000000 -1000000000 621 950 1509 1613 1969 2244 2244 2244 2244 2244 2244 2244 2244 2244 2244 2385 2428 2590 2653 2938 3325 3389 3533 3598 -1000000000 -1000000000 -1000000000 -1000000000 956 1517 1649 2021 2304 2304 2304 2304 2304 2304 2304 2304 2304 2304 2481 2536 2736 2781 2988 3505 3609 3873 4038 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 1523 1657 2045 2356 2356 2356 2356 2356 2356 2356 2356 2356 2356 2533 2588 2808 2871 3156 3555 3659 4005 4280 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 1663 2053 2380 2380 2380 2380 2380 2380 2380 2380 2380 2380 2563 2628 2868 2923 3206 3723 3827 4091 4340 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 2059 2388 2388 2388 2388 2388 2388 2388 2388 2388 2388 2587 2652 2900 2963 3258 3773 3877 4223 4498 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 2394 2394 2394 2394 2394 2394 2394 2394 2394 2394 2595 2660 2924 2987 3298 3825 3929 4273 4558 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 2394 2394 2394 2394 2394 2394 2394 2394 2394 2601 2666 2932 2995 3322 3865 3969 4325 4608 Model: 207 272 512 567 812 1127 1175 1271 1296 1296 1296 1296 1296 1296 1296 1296 1296 1296 1287 1280 1232 1215 1100 767 671 335 0 -1000000000 278 544 607 [908] 1379 1483 1747 1912 1912 1912 1912 1912 1912 1912 1912 1912 1912 2023 2062 2198 2227 2350 2503 2531 2567 2592 -1000000000 -1000000000 550 615 942 1475 1579 1891 2154 2154 2154 2154 2154 2154 2154 2154 2154 2154 2295 2338 2514 2559 2754 3069 3133 3327 3450 -1000000000 -1000000000 -1000000000 621 950 1509 1615 1987 2250 2250 2250 2250 2250 2250 2250 2250 2250 2250 2403 2458 2666 2721 2966 3371 3455 3689 3854 -1000000000 -1000000000 -1000000000 -1000000000 956 1517 1649 2021 2322 2322 2322 2322 2322 2322 2322 2322 2322 2322 2499 2554 2762 2817 3078 3533 3637 3901 4138 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 1523 1657 2045 2356 2356 2356 2356 2356 2356 2356 2356 2356 2356 2533 2594 2834 2895 3174 3645 3749 4045 4308 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 1663 2053 2380 2380 2380 2380 2380 2380 2380 2380 2380 2380 2563 2628 2868 2929 3230 3741 3845 4157 4420 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 2059 2388 2388 2388 2388 2388 2388 2388 2388 2388 2388 2587 2652 2900 2963 3264 3797 3901 4253 4516 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 2394 2394 2394 2394 2394 2394 2394 2394 2394 2394 2595 2660 2924 2987 3298 3831 3937 4309 4588 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 2394 2394 2394 2394 2394 2394 2394 2394 2394 2601 2666 2932 2995 3322 3865 3971 4343 4644 */

컴파일 시 표준 에러 (stderr) 메시지

sequence.cpp:1: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
    1 | #pragma GCC optimization ("unroll-loops")
      | 
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/gthr.h:148,
                 from /usr/include/c++/9/ext/atomicity.h:35,
                 from /usr/include/c++/9/bits/ios_base.h:39,
                 from /usr/include/c++/9/ios:42,
                 from /usr/include/c++/9/istream:38,
                 from /usr/include/c++/9/sstream:38,
                 from /usr/include/c++/9/complex:45,
                 from /usr/include/c++/9/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
                 from sequence.cpp:4:
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:102:1: error: option("tune=") was already specified
  102 | __gthrw(pthread_once)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:102:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:103:1: error: option("tune=") was already specified
  103 | __gthrw(pthread_getspecific)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:103:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:104:1: error: option("tune=") was already specified
  104 | __gthrw(pthread_setspecific)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:104:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:106:1: error: option("tune=") was already specified
  106 | __gthrw(pthread_create)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:106:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:107:1: error: option("tune=") was already specified
  107 | __gthrw(pthread_join)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:107:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:108:1: error: option("tune=") was already specified
  108 | __gthrw(pthread_equal)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:108:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:109:1: error: option("tune=") was already specified
  109 | __gthrw(pthread_self)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:109:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:110:1: error: option("tune=") was already specified
  110 | __gthrw(pthread_detach)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:110:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:112:1: error: option("tune=") was already specified
  112 | __gthrw(pthread_cancel)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:112:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:114:1: error: option("tune=") was already specified
  114 | __gthrw(sched_yield)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:114:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:116:1: error: option("tune=") was already specified
  116 | __gthrw(pthread_mutex_lock)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:116:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:117:1: error: option("tune=") was already specified
  117 | __gthrw(pthread_mutex_trylock)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:117:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:119:1: error: option("tune=") was already specified
  119 | __gthrw(pthread_mutex_timedlock)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:119:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:121:1: error: option("tune=") was already specified
  121 | __gthrw(pthread_mutex_unlock)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:121:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:122:1: error: option("tune=") was already specified
  122 | __gthrw(pthread_mutex_init)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:122:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:123:1: error: option("tune=") was already specified
  123 | __gthrw(pthread_mutex_destroy)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:123:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:125:1: error: option("tune=") was already specified
  125 | __gthrw(pthread_cond_init)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:125:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:126:1: error: option("tune=") was already specified
  126 | __gthrw(pthread_cond_broadcast)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:126:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:127:1: error: option("tune=") was already specified
  127 | __gthrw(pthread_cond_signal)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:127:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:128:1: error: option("tune=") was already specified
  128 | __gthrw(pthread_cond_wait)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:128:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:129:1: error: option("tune=") was already specified
  129 | __gthrw(pthread_cond_timedwait)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:129:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:130:1: error: option("tune=") was already specified
  130 | __gthrw(pthread_cond_destroy)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:130:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:132:1: error: option("tune=") was already specified
  132 | __gthrw(pthread_key_create)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:132:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:133:1: error: option("tune=") was already specified
  133 | __gthrw(pthread_key_delete)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:133:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:134:1: error: option("tune=") was already specified
  134 | __gthrw(pthread_mutexattr_init)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:134:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:135:1: error: option("tune=") was already specified
  135 | __gthrw(pthread_mutexattr_settype)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:135:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:136:1: error: option("tune=") was already specified
  136 | __gthrw(pthread_mutexattr_destroy)
      | ^~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:136:1: error: option("tune=") was already specified
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:237:1: error: option("tune=") was already specified
  237 | __gthrw2(__gthrw_(__pthread_key_create),
      | ^~~~~~~~
/usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:237:1: error: option("tune=") was already specified
/usr/include/c++/9/shared_mutex:71:3: error: option("tune=") was already specified
   71 |   _GLIBCXX_GTHRW(rwlock_rdlock)
      |   ^~~~~~~~~~~~~~
/usr/include/c++/9/shared_mutex:71:3: error: option("tune=") was already specified
/usr/include/c++/9/shared_mutex:72:3: error: option("tune=") was already specified
   72 |   _GLIBCXX_GTHRW(rwlock_tryrdlock)
      |   ^~~~~~~~~~~~~~
/usr/include/c++/9/shared_mutex:72:3: error: option("tune=") was already specified
/usr/include/c++/9/shared_mutex:73:3: error: option("tune=") was already specified
   73 |   _GLIBCXX_GTHRW(rwlock_wrlock)
      |   ^~~~~~~~~~~~~~
/usr/include/c++/9/shared_mutex:73:3: error: option("tune=") was already specified
/usr/include/c++/9/shared_mutex:74:3: error: option("tune=") was already specified
   74 |   _GLIBCXX_GTHRW(rwlock_trywrlock)
      |   ^~~~~~~~~~~~~~
/usr/include/c++/9/shared_mutex:74:3: error: option("tune=") was already specified
/usr/include/c++/9/shared_mutex:75:3: error: option("tune=") was already specified
   75 |   _GLIBCXX_GTHRW(rwlock_unlock)
      |   ^~~~~~~~~~~~~~
/usr/include/c++/9/shared_mutex:75:3: error: option("tune=") was already specified
/usr/include/c++/9/shared_mutex:89:4: error: option("tune=") was already specified
   89 |    __gthrw(pthread_rwlock_timedrdlock);
      |    ^~~~~~~
/usr/include/c++/9/shared_mutex:89:4: error: option("tune=") was already specified
/usr/include/c++/9/shared_mutex:99:4: error: option("tune=") was already specified
   99 |    __gthrw(pthread_rwlock_timedwrlock);
      |    ^~~~~~~
/usr/include/c++/9/shared_mutex:99:4: error: option("tune=") was already specified
sequence.cpp: In member function 'void auxiliary_tree::dfs(long long int, long long int, long long int)':
sequence.cpp:82:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   82 |         for(int i=0;i<ori[node].size();i++){
      |                     ~^~~~~~~~~~~~~~~~~
sequence.cpp: In member function 'void auxiliary_tree::build(std::vector<long long int>)':
sequence.cpp:154:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  154 |         for(int i=0;i<g.size();i++){
      |                     ~^~~~~~~~~
sequence.cpp:158:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  158 |         for(int i=0;i<g.size();i++){
      |                     ~^~~~~~~~~
sequence.cpp:165:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  165 |         for(int i=0;i<g.size();i++){
      |                     ~^~~~~~~~~
sequence.cpp:169:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  169 |         for(int i=0;i<g.size();i++){
      |                     ~^~~~~~~~~
sequence.cpp:173:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  173 |         for(int i=0;i<g.size();i++){
      |                     ~^~~~~~~~~
sequence.cpp:179:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  179 |         for(int i=1;i<g.size();i++){
      |                     ~^~~~~~~~~
sequence.cpp: In member function 'void auxiliary_tree::clear()':
sequence.cpp:196:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  196 |         for(int i=0;i<storelatest.size();i++){
      |                     ~^~~~~~~~~~~~~~~~~~~