제출 #1081250

#제출 시각아이디문제언어결과실행 시간메모리
1081250anango휴가 (IOI14_holiday)C++17
컴파일 에러
0 ms0 KiB
#include"holiday.h" #include <bits/stdc++.h> #define vector basic_string using namespace std; #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> ordered_set; #define int long long int INF = 1LL<<62; const int sz = 262144; vector<int> revcoords; class SegmentTree { public: vector<int> tree; int n; ordered_set current_indices; SegmentTree(int numelem) { tree=vector<int>(sz,0); n=numelem; //cout << "making segtree " << n << endl; } void update(int v, int l, int r, int tl, int tr, int addend) { if (l>tr || r<tl) return; if (l<=tl && tr<=r) { assert(l==r); tree[v]+=addend; return; } int m = (tl+tr)/2; update(2*v,l,r,tl,m,addend); update(2*v+1,l,r,m+1,tr,addend); tree[v] = tree[2*v]+tree[2*v+1]; } int query(int v, int l, int r, int tl, int tr) { if (l>tr || r<tl) return 0; if (l<=tl && tr<=r) { //cout << "qend " << tl <<" " << tr <<" " << tree[v] << endl; return tree[v]; } int m = (tl+tr)/2; return query(2*v,l,r,tl,m)+query(2*v+1,l,r,m+1,tr); } void ins(int index, int weight) { //weight must be weights[index] int rc = revcoords[index]; current_indices.insert(rc); //cout << "updating " << rc <<" " << weight << endl; update(1,rc,rc,0,131071,weight); } void era(int index, int weight) { //weight must be weights[index] int rc = revcoords[index]; current_indices.erase(rc); update(1,rc,rc,0,131071,-weight); } int get_sum_maximals(int k) { //(1 indexed, so k=1 means you just want max etc) if (current_indices.size()<k) { return tree[1]; //sum of everything } if (k<=0) return 0; int reqcid = current_indices.size(); reqcid-=k; int req_index = *current_indices.find_by_order(reqcid); int ans = query(1,req_index,131071,0,131071); //cout << "getting " << k <<" " << current_indices.size() <<" " << reqcid <<" " << req_index << " " << ans << endl; return ans; } }; vector<int> optimal_k; vector<int> answers; int state = -1; //state i means it contains 0 to i inclusive SegmentTree st(1); void solve(int l, int r, vector<int> &weights) { if (l>r) return; //solve for all d int m = (l+r)/2; //cout << "solving " << l <<" " << m <<" " << r << endl; int vleft = optimal_k[l-1]; int vright = optimal_k[r+1]; //find optimal_k[m], by going from vleft to vright while (state>vleft) { st.era(state,weights[state]); state--; } while (state<vleft) { state++; st.ins(state,weights[state]); } //state is now equal to m int opk = -1; int curbest = -1; for (int k=vleft; k<=vright; k++) { if (m-k-1<=0) continue; int kans = st.get_sum_maximals(m-k-1); //cout << "doing " << k <<" " << kans << " " << m-k-1 << " " << vleft << " " << curbest <<" " << opk << endl; if (kans>curbest) { curbest = kans; opk = k; } assert(state==k); state++; st.ins(state,weights[state]); } optimal_k[m] = opk; answers[m] = curbest; //cout << "solved " << l <<" " << m<<" " << r <<" " << vleft <<" "<< vright << " " << opk <<" " << curbest << endl; if (l<r) { solve(l,m-1,weights); solve(m+1,r,weights); } return; } vector<int> solve_for_all_d(int n, vector<int> weights) { st = SegmentTree(n); //ignore the middle itself revcoords=vector<int>(n,-1); vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0); for (int i=0; i<n; i++) { //cout << weights[i] <<" "; } //cout << endl << endl; sort(coords.begin(), coords.end(),[&](const int i1, const int i2) { return weights[i1]<weights[i2]; }); for (int i=0; i<coords.size(); i++) { //revcoords is what position this index takes in the sorted list by weight revcoords[coords[i]] = i; } //find the optimal k for each d using divide and conquer //taking 0 through k //consider d<=2n optimal_k = vector<int>(2*n+1,-1); optimal_k[2] = 0; optimal_k[2*n] = n-1; answers=vector<int>(2*n+1,-1); answers[0] = answers[1] = 0; answers[2] = weights[0]; answers[2*n] = accumulate(weights.begin(), weights.end(), (int)0); state = -1; solve(3,2*n-1,weights); for (int i=0; i<2*n+1; i++) { //cout << i <<" " << optimal_k[i] <<" " << answers[i] << endl; } return answers; } void solvedouble(int l, int r, vector<int> &weights) { if (l>r) return; //solve for all d int m = (l+r)/2; //cout << "solving " << l <<" " << m <<" " << r << endl; int vleft = optimal_k[l-1]; int vright = optimal_k[r+1]; //find optimal_k[m], by going from vleft to vright while (state>vleft) { st.era(state,weights[state]); state--; } while (state<vleft) { state++; st.ins(state,weights[state]); } //state is now equal to m int opk = -1; int curbest = -1; for (int k=vleft; k<=vright; k++) { if (m-2*k-2<=0) continue; int kans = st.get_sum_maximals(m-2*k-2); //cout << "doing " << k <<" " << kans << " " << m-2*k-1 << " " << vleft << " " << curbest <<" " << opk << " " << state << endl; if (kans>curbest) { curbest = kans; opk = k; } assert(state==k); state++; st.ins(state,weights[state]); } optimal_k[m] = opk; answers[m] = curbest; //cout << "solved " << l <<" " << m<<" " << r <<" " << vleft <<" "<< vright << " " << opk <<" " << curbest << endl; if (l<r) { solvedouble(l,m-1,weights); solvedouble(m+1,r,weights); } return; } vector<int> solve_for_all_d_double(int n, vector<int> weights) { if (n==0) { return {0}; } if (n==1) { return {0,0,0,weights[0]}; } st = SegmentTree(n); //ignore the middle itself revcoords=vector<int>(n,-1); vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0); for (int i=0; i<n; i++) { //cout << weights[i] <<" "; } //cout << endl << endl; sort(coords.begin(), coords.end(),[&](const int i1, const int i2) { return weights[i1]<weights[i2]; }); for (int i=0; i<coords.size(); i++) { //revcoords is what position this index takes in the sorted list by weight revcoords[coords[i]] = i; } //find the optimal k for each d using divide and conquer //taking 0 through k //consider d<=2n optimal_k = vector<int>(3*n+1,-1); optimal_k[3] = 0; optimal_k[3*n] = n-1; answers=vector<int>(3*n+1,-1); answers[0] = answers[1] = answers[2] = 0; answers[3] = weights[0]; answers[3*n] = accumulate(weights.begin(), weights.end(), (int)0); state = -1; solvedouble(4,3*n-1,weights); for (int i=0; i<3*n+1; i++) { //cout << "lefting " << i <<" " << optimal_k[i] <<" " << answers[i] << endl; } return answers; } vector<int> attractions; int best = -INF; long long findMaxAttraction(signed n, signed start, signed d, signed attraction[]) { for (int i=0; i<n; i++) { attractions.push_back(attraction[i]); } vector<int> right; for (int i=start; i<n; i++) { right.push_back(attractions[i]); } vector<int> left; for (int i=start-1; i>=0; i--) { left.push_back(attractions[i]); } vector<int> right_ans = solve_for_all_d(right.size(), right); vector<int> left_ans = solve_for_all_d_double(left.size(), left); while (right_ans.size()<=d+8) { right_ans.push_back(right_ans.back()); } while (left_ans.size()<=d+8) { left_ans.push_back(left_ans.back()); } for (int i=0; i<right_ans.size(); i++) { //cout << "right " << i <<" " << right_ans[i] << endl; } for (int i=0; i<left_ans.size(); i++) { //cout << "left " << i <<" " << left_ans[i] << endl; } //left then right for (int days_left=0; days_left<=d+1; days_left++) { int days_right = d-days_left+1; if (days_right<0) continue; int total_ans = left_ans[days_left]+right_ans[days_right]; best=max(best,total_ans); } start=n-start-1; right.clear(); left.clear(); reverse(attractions.begin(), attractions.end()); for (int i=start; i<n; i++) { right.push_back(attractions[i]); } for (int i=start-1; i>=0; i--) { left.push_back(attractions[i]); } right_ans = solve_for_all_d(right.size(), right); left_ans = solve_for_all_d_double(left.size(), left); while (right_ans.size()<=d+8) { right_ans.push_back(right_ans.back()); } while (left_ans.size()<=d+8) { left_ans.push_back(left_ans.back()); } for (int i=0; i<right_ans.size(); i++) { //cout << "right " << i <<" " << right_ans[i] << endl; } for (int i=0; i<left_ans.size(); i++) { //cout << "left " << i <<" " << left_ans[i] << endl; } //left then right for (int days_left=0; days_left<=d+1; days_left++) { int days_right = d-days_left+1; if (days_right<0) continue; int total_ans = left_ans[days_left]+right_ans[days_right]; best=max(best,total_ans); } return best; }

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

holiday.cpp: In member function 'long long int SegmentTree::get_sum_maximals(long long int)':
holiday.cpp:65:30: warning: comparison of integer expressions of different signedness: '__gnu_pbds::detail::bin_search_tree_set<int, __gnu_pbds::null_type, std::less<int>, __gnu_pbds::detail::tree_traits<int, __gnu_pbds::null_type, std::less<int>, __gnu_pbds::tree_order_statistics_node_update, __gnu_pbds::rb_tree_tag, std::allocator<char> >, std::allocator<char> >::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
   65 |    if (current_indices.size()<k) {
      |        ~~~~~~~~~~~~~~~~~~~~~~^~
holiday.cpp: In function 'std::__cxx11::basic_string<long long int> solve_for_all_d(long long int, std::__cxx11::basic_string<long long int>)':
holiday.cpp:128:23: error: no matching function for call to 'std::__cxx11::basic_string<long long int>::basic_string(long long int&)'
  128 |   vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0);
      |                       ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from holiday.cpp:2:
/usr/include/c++/10/bits/basic_string.h:650:2: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with _Tp = _Tp; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  650 |  basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
      |  ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:650:2: note:   template argument deduction/substitution failed:
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 holiday.cpp:2:
/usr/include/c++/10/type_traits: In substitution of 'template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = void]':
/usr/include/c++/10/bits/basic_string.h:117:8:   required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using _If_sv = std::enable_if_t<std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value, _Res> [with _Tp = long long int; _Res = void; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
/usr/include/c++/10/bits/basic_string.h:648:30:   required from here
/usr/include/c++/10/type_traits:2554:11: error: no type named 'type' in 'struct std::enable_if<false, void>'
 2554 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from holiday.cpp:2:
/usr/include/c++/10/bits/basic_string.h:639:2: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _Tp = _Tp; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  639 |  basic_string(const _Tp& __t, size_type __pos, size_type __n,
      |  ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:639:2: note:   template argument deduction/substitution failed:
holiday.cpp:128:23: note:   candidate expects 4 arguments, 1 provided
  128 |   vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0);
      |                       ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from holiday.cpp:2:
/usr/include/c++/10/bits/basic_string.h:625:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator, _InputIterator, const _Alloc&) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  625 |         basic_string(_InputIterator __beg, _InputIterator __end,
      |         ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:625:9: note:   template argument deduction/substitution failed:
holiday.cpp:128:23: note:   candidate expects 3 arguments, 1 provided
  128 |   vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0);
      |                       ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from holiday.cpp:2:
/usr/include/c++/10/bits/basic_string.h:587:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  587 |       basic_string(basic_string&& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:587:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/basic_string.h:583:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  583 |       basic_string(const basic_string& __str, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:583:7: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/basic_string.h:579:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::initializer_list<_Tp>, const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  579 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:579:45: note:   no known conversion for argument 1 from 'long long int' to 'std::initializer_list<long long int>'
  579 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/basic_string.h:552:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  552 |       basic_string(basic_string&& __str) noexcept
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:552:35: note:   no known conversion for argument 1 from 'long long int' to 'std::__cxx11::basic_string<long long int>&&'
  552 |       basic_string(basic_string&& __str) noexcept
      |                    ~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/bits/basic_string.h:540:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT, const _Alloc&) [with <template-parameter-2-1> = <template-parameter-1-1>; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  540 |       basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:540:7: note:   template argument deduction/substitution failed:
holiday.cpp:128:23: note:   candidate expects 3 arguments, 1 provided
  128 |   vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0);
      |                       ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from holiday.cpp:2:
/usr/include/c++/10/bits/basic_string.h:525:7: note: candidate: 'template<class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, const _Alloc&) [with <template-parameter-2-1> = <template-parameter-1-1>; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  525 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:525:7: note:   template argument deduction/substitution failed:
holiday.cpp:128:22: note:   cannot convert 'n' (type 'long long int') to type 'const long long int*'
  128 |   vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0);
      |                      ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from holiday.cpp:2:
/usr/include/c++/10/bits/basic_string.h:510:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
  510 |       basic_string(const _CharT* __s, size_type __n,
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:510:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/10/bits/basic_string.h:492:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
  492 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:492:7: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/10/bits/basic_string.h:476:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
  476 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:476:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/10/bits/basic_string.h:461:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]'
  461 |       basic_string(const basic_string& __str, size_type __pos,
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:461:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/10/bits/basic_string.h:448:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  448 |       basic_string(const basic_string& __str)
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:448:40: note:   no known conversion for argument 1 from 'long long int' to 'const std::__cxx11::basic_string<long long int>&'
  448 |       basic_string(const basic_string& __str)
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/10/bits/basic_string.h:440:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  440 |       basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:440:34: note:   no known conversion for argument 1 from 'long long int' to 'const std::allocator<long long int>&'
  440 |       basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      |                    ~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/basic_string.h:431:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  431 |       basic_string()
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:431:7: note:   candidate expects 0 arguments, 1 provided
/usr/include/c++/10/bits/basic_string.h:145:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__sv_wrapper, const _Alloc&) [with _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  145 |       basic_string(__sv_wrapper __svw, const _Alloc& __a)
      |       ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:145:7: note:   candidate expects 2 arguments, 1 provided
holiday.cpp:137:18: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  137 |   for (int i=0; i<coords.size(); i++) {
      |                 ~^~~~~~~~~~~~~~
holiday.cpp: In function 'std::__cxx11::basic_string<long long int> solve_for_all_d_double(long long int, std::__cxx11::basic_string<long long int>)':
holiday.cpp:216:23: error: no matching function for call to 'std::__cxx11::basic_string<long long int>::basic_string(long long int&)'
  216 |   vector<int> coords(n); iota(coords.begin(), coords.end(), (int)0);
      |                       ^
In file included from /usr/include/c++/10/string:55,
                 from /usr/include/c++/10/bits/locale_classes.h:40,
                 from /usr/include/c++/10/bits/ios_base.h:41,
                 from /usr/include/c++/10/ios:42,
                 from /usr/include/c++/10/istream:38,
                 from /usr/include/c++/10/sstream:38,
                 from /usr/include/c++/10/complex:45,
                 from /usr/include/c++/10/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
                 from holiday.cpp:2:
/usr/include/c++/10/bits/basic_string.h:650:2: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, const _Alloc&) [with _Tp = _Tp; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  650 |  basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
      |  ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:650:2: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/basic_string.h:639:2: note: candidate: 'template<class _Tp, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _Tp&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _Tp = _Tp; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = long long int; _Traits = std::char_traits<long long int>; _Alloc = std::allocator<long long int>]'
  639 |  basic_string(const _Tp& __t, size_type __pos, size_type __n,
      |  ^~~~~~~~~~~~
/usr/include/c++/10/bits/basic_string.h:639:2: note:   template argument deduction/substitution failed:
/var/local/lib/isolate/615/b