Submission #1107685

#TimeUsernameProblemLanguageResultExecution timeMemory
1107685modwweRobots (APIO13_robots)C++17
Compilation error
0 ms0 KiB
#pragma GCC optimize("Ofast,unroll-loops") //#pragma GCC optimize("conserve-stack") #include<bits/stdc++.h> #define int long long #define ll long long #define down cout<<'\n'; #define debug cout<<" cucuucucuuu",down #define NHP ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0); #define modwwe int t;cin>>t; while(t--) #define bit(i,j) (i>>j&1) #define sobit(a) __builtin_popcountll(a) #define task "test" #define fin(x) freopen(x".inp","r",stdin) #define fou(x) freopen(x".ans","w",stdout) #define pb push_back #define mask(i) (1<<i) #define checktime cerr << (double)clock() / CLOCKS_PER_SEC * 1000 << " ms"; using namespace std; #define getchar_unlocked getchar inline int scan() { char c = getchar_unlocked(); int x = 0; while (c < '0' || c > '9') { c = getchar_unlocked(); } while (c >= '0' && c <= '9') { x = (x << 1) + (x << 3) + c - '0'; c = getchar_unlocked(); } return x; }; void phongbeo(); const int inf = 1e18; const int mod2 = -1e9+7; const int mod1 = 998244353; const int base=67; int add(int x,int y) { if(x+y>=mod2) x-=mod2; if(x+y<0) x+=mod2; return x+y; } struct icd { int c,d; }; struct ib { int a; int b; }; struct ic { int a, b, c; }; struct id { int a,b,c,d; }; struct ie { int a, b, c, d, e; }; int n, m, s1, s2, s4, s3, sf, k, s5, s6, mx, s7, s8, s9, mx2, res, dem2 = 0, dem = 0, s33, dem3, dem4, mid, l2, r2, center; int i, s10, s12,k1,k2,k3,s11,limit,w,l,r,last,root,cost; int kk; int el = 19; main() { if(fopen(task".inp","r")) { fin(task); // fou(task); } NHP /// cin>>s1; // modwwe phongbeo(),down // checktime } vector<int> v[200001]; int par[200001]; id a[200001]; ic dp[200001][3][2]; icd c[200001]; void dfs(int x,int y) { in[x]=++dem; par[x]=y; for(auto f:v[x]) if(f!=y) dfs(f,x); ou[x]=dem; } namespace sub5 { ///ta nhan xet la dinh cua canh x con lon nhat =dinh cua canh x+1 con lon nhat struct IT { ib t[800001]; int t2[800001]; ib mer(ib a,ib b) { if(a.a>=b.a) return a; return b; } void ff(int x) { for(int i=x*2; i<=x*2+1; i++) { t[i].a-=t2[x]; t2[i]+=t2[x]; } t2[x]=0; } void upd(int node,int l,int r,int l1,int r1,int x)/// find minimum cost { if(l>r1||r<l1) return; if(l>=l1&&r<=r1) { t[node].a-=x; t2[node]+=x; return; } int mid=l+r>>1; if(t2[node]!=0) ff(node); upd(node<<1,l,mid,l1,r1,x); upd(node<<1|1,mid+1,r,l1,r1,x); t[node]=mer(t[node<<1],t[node<<1|1]); } };///->t1=minimum new cost ic mer(ic a,ic b) { if(a.b<b.b) swap(a.a,b.a); return {a.a+b.a,a.b,max({a.c,b.c,b.b})}; } void dfs2(int x,int y) { dp[x][0][0]= {0,0,0}; for(auto f:v[x]) { if(f!=y) { dfs2(f,x); ///.b .c luu 2 con dc lay ///.a la luu cost for(int i=0; i<=2; i++) for(int j=0; j<2; j++) dp[x][i][j].a+=dp[f][0][0].a+c[f].c; for(int i=1; i<=2; i++) { if(dp[f][i][1].a+c[f].d+dp[x][0][0].a-dp[f][0][0].a-c[f].c<dp[x][i][1].a) dp[x][i][1]=dp[f][i][1], dp[x][i][1].a+=c[f].d+dp[x][0][0].a-dp[f][0][0].a-c[f].c; } for(int i=2; i>=0; --i) for(int j=0; j<=2; j++) if(i+j<=2) { if(dp[x][i+j][0].a>dp[x][i][0].a+dp[f][j][0].a+(j==0)*c[f].c-c[f].c-dp[f][0][0].a) dp[x][i+j][0]=mer(dp[x][i][0],dp[f][j][0]), dp[x][i+j][0].a+=(j==0)*c[f].c-c[f].c-dp[f][0][0].a; if(i>0&&j>0) if(dp[x][i+j][1].a>dp[x][i][0].a+dp[f][j][0].a+(j==0)*c[f].c-c[f].c-dp[f][0][0].a) dp[x][i+j][1]=mer(dp[x][i][0],dp[f][j][0]), dp[x][i+j][1].a+=(j==0)*c[f].c-c[f].c-dp[f][0][0].a; } } } for(int i=1; i>=0; i--) { if(dp[x][i+1][0].a>dp[x][i][0].a)dp[x][i+1][0]=mer({0,i,0},dp[x][i][0]); if(dp[x][i+1][1].a>dp[x][i][0].a)dp[x][i+1][1]=mer({0,i,0},dp[x][i][0]); } } void go(int x) { } void solve() { for(int i=1; i<n; i++) cin>>a[i].a>>a[i].b>>a[i].c>>a[i].d, v[a[i].a].pb(a[i].b), v[a[i].b].pb(a[i].a); dfs(1,0); for(int i=1; i<n; i++) { if(par[a[i].a]==a[i].b) swap(a[i].c,a[i].d),swap(a[i].a,a[i].b); c[a[i].b]= {a[i].c,a[i].d}; } for(int i=1; i<=n; i++) for(int j=0; j<=2; j++) for(int f=0; f<2; f++) dp[i][j][f]= {inf,0,0}; dfs2(1,0); res[1]=dp[1][1][1].a; res[2]=dp[1][2][1].a; s2=dp[1][2][1].b; st.upd(1,1,n,s2,s2,inf); while(s2!=1) { st.upd(1,1,n,in[s2],ou[s2],c[s2].d); st.upd(1,1,n,1,n,-c[s2].d); s2=par[s2]; } for(int i=1;i<n;i++) if(in[]) go(dp[1][2][1].c); for(int i=3; i<=n; i++) res[i]=res[i-1]-get(); } } void phongbeo() { cin>>n; sub6::solve(); }

Compilation message (stderr)

robots.cpp:75:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   75 | main()
      | ^~~~
robots.cpp: In function 'void dfs(long long int, long long int)':
robots.cpp:95:5: error: 'in' was not declared in this scope; did you mean 'i'?
   95 |     in[x]=++dem;
      |     ^~
      |     i
robots.cpp:100:5: error: 'ou' was not declared in this scope; did you mean 'fou'?
  100 |     ou[x]=dem;
      |     ^~
      |     fou
robots.cpp: In member function 'void sub5::IT::upd(long long int, long long int, long long int, long long int, long long int, long long int)':
robots.cpp:132:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  132 |         int mid=l+r>>1;
      |                 ~^~
robots.cpp: In function 'void sub5::solve()':
robots.cpp:206:8: error: invalid types 'long long int[int]' for array subscript
  206 |     res[1]=dp[1][1][1].a;
      |        ^
robots.cpp:207:8: error: invalid types 'long long int[int]' for array subscript
  207 |     res[2]=dp[1][2][1].a;
      |        ^
robots.cpp:209:5: error: 'st' was not declared in this scope; did you mean 's9'?
  209 |     st.upd(1,1,n,s2,s2,inf);
      |     ^~
      |     s9
robots.cpp:212:22: error: 'in' was not declared in this scope; did you mean 'i'?
  212 |         st.upd(1,1,n,in[s2],ou[s2],c[s2].d);
      |                      ^~
      |                      i
robots.cpp:212:29: error: 'ou' was not declared in this scope; did you mean 'fou'?
  212 |         st.upd(1,1,n,in[s2],ou[s2],c[s2].d);
      |                             ^~
      |                             fou
robots.cpp:217:12: error: 'in' was not declared in this scope; did you mean 'i'?
  217 |         if(in[])
      |            ^~
      |            i
robots.cpp:217:15: error: expected primary-expression before ']' token
  217 |         if(in[])
      |               ^
robots.cpp:219:32: error: invalid types 'long long int[long long int]' for array subscript
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                ^
robots.cpp:219:39: error: invalid types 'long long int[long long int]' for array subscript
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                       ^
robots.cpp:219:49: error: no matching function for call to 'get()'
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:223:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(std::pair<_Tp1, _Tp2>&)'
  223 |     get(std::pair<_Tp1, _Tp2>& __in) noexcept
      |     ^~~
/usr/include/c++/10/utility:223:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:228:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(std::pair<_Tp1, _Tp2>&&)'
  228 |     get(std::pair<_Tp1, _Tp2>&& __in) noexcept
      |     ^~~
/usr/include/c++/10/utility:228:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:233:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type& std::get(const std::pair<_Tp1, _Tp2>&)'
  233 |     get(const std::pair<_Tp1, _Tp2>& __in) noexcept
      |     ^~~
/usr/include/c++/10/utility:233:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:238:5: note: candidate: 'template<long unsigned int _Int, class _Tp1, class _Tp2> constexpr const typename std::tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&& std::get(const std::pair<_Tp1, _Tp2>&&)'
  238 |     get(const std::pair<_Tp1, _Tp2>&& __in) noexcept
      |     ^~~
/usr/include/c++/10/utility:238:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:247:5: note: candidate: 'template<class _Tp, class _Up> constexpr _Tp& std::get(std::pair<_T1, _T2>&)'
  247 |     get(pair<_Tp, _Up>& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:247:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:252:5: note: candidate: 'template<class _Tp, class _Up> constexpr const _Tp& std::get(const std::pair<_T1, _T2>&)'
  252 |     get(const pair<_Tp, _Up>& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:252:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:257:5: note: candidate: 'template<class _Tp, class _Up> constexpr _Tp&& std::get(std::pair<_T1, _T2>&&)'
  257 |     get(pair<_Tp, _Up>&& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:257:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:262:5: note: candidate: 'template<class _Tp, class _Up> constexpr const _Tp&& std::get(const std::pair<_T1, _T2>&&)'
  262 |     get(const pair<_Tp, _Up>&& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:262:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:267:5: note: candidate: 'template<class _Tp, class _Up> constexpr _Tp& std::get(std::pair<_Up, _Tp>&)'
  267 |     get(pair<_Up, _Tp>& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:267:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:272:5: note: candidate: 'template<class _Tp, class _Up> constexpr const _Tp& std::get(const std::pair<_Up, _Tp>&)'
  272 |     get(const pair<_Up, _Tp>& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:272:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:277:5: note: candidate: 'template<class _Tp, class _Up> constexpr _Tp&& std::get(std::pair<_Up, _Tp>&&)'
  277 |     get(pair<_Up, _Tp>&& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:277:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/utility:282:5: note: candidate: 'template<class _Tp, class _Up> constexpr const _Tp&& std::get(const std::pair<_Up, _Tp>&&)'
  282 |     get(const pair<_Up, _Tp>&& __p) noexcept
      |     ^~~
/usr/include/c++/10/utility:282:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/array:334:5: note: candidate: 'template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr _Tp& std::get(std::array<_Tp, _Nm>&)'
  334 |     get(array<_Tp, _Nm>& __arr) noexcept
      |     ^~~
/usr/include/c++/10/array:334:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/array:343:5: note: candidate: 'template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr _Tp&& std::get(std::array<_Tp, _Nm>&&)'
  343 |     get(array<_Tp, _Nm>&& __arr) noexcept
      |     ^~~
/usr/include/c++/10/array:343:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/array:351:5: note: candidate: 'template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr const _Tp& std::get(const std::array<_Tp, _Nm>&)'
  351 |     get(const array<_Tp, _Nm>& __arr) noexcept
      |     ^~~
/usr/include/c++/10/array:351:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/tuple:39,
                 from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/array:360:5: note: candidate: 'template<long unsigned int _Int, class _Tp, long unsigned int _Nm> constexpr const _Tp&& std::get(const std::array<_Tp, _Nm>&&)'
  360 |     get(const array<_Tp, _Nm>&& __arr) noexcept
      |     ^~~
/usr/include/c++/10/array:360:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/tuple:1294:5: note: candidate: 'template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_UTypes ...> >& std::get(std::tuple<_UTypes ...>&)'
 1294 |     get(tuple<_Elements...>& __t) noexcept
      |     ^~~
/usr/include/c++/10/tuple:1294:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/tuple:1300:5: note: candidate: 'template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_UTypes ...> >& std::get(const std::tuple<_UTypes ...>&)'
 1300 |     get(const tuple<_Elements...>& __t) noexcept
      |     ^~~
/usr/include/c++/10/tuple:1300:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/tuple:1306:5: note: candidate: 'template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_UTypes ...> >&& std::get(std::tuple<_UTypes ...>&&)'
 1306 |     get(tuple<_Elements...>&& __t) noexcept
      |     ^~~
/usr/include/c++/10/tuple:1306:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/tuple:1315:5: note: candidate: 'template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_UTypes ...> >&& std::get(const std::tuple<_UTypes ...>&&)'
 1315 |     get(const tuple<_Elements...>&& __t) noexcept
      |     ^~~
/usr/include/c++/10/tuple:1315:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i]=res[i-1]-get();
      |                                                 ^
In file included from /usr/include/c++/10/functional:54,
                 from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
                 from /usr/include/c++/10/algorithm:74,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from robots.cpp:3:
/usr/include/c++/10/tuple:1338:5: note: candidate: 'template<class _Tp, class ... _Types> constexpr _Tp& std::get(std::tuple<_UTypes ...>&)'
 1338 |     get(tuple<_Types...>& __t) noexcept
      |     ^~~
/usr/include/c++/10/tuple:1338:5: note:   template argument deduction/substitution failed:
robots.cpp:219:49: note:   candidate expects 1 argument, 0 provided
  219 |     for(int i=3; i<=n; i++) res[i