| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1141330 | harry_tm_18 | Detecting Molecules (IOI16_molecules) | C++20 | Compilation error | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 1e5;
vector<int> adj[N];
vector<bool> c(N);
vector<int> find_subset(int l, int u, vector<int> w){
int n = w.size();
vector<pair<ll,ll>> a;
for(int i=0; i<n; ++i){
a.emplace_back(w[i] i);
}
sort(a.begin(), a.end());
vector<ll> suffix(n), ans;
suffix[n-1] = a[n-1].first;
for(int i=n-2; i>=0; --i){
suffix[i] = suffix[i+1] + a[i];
}
ll prefixSum = 0;
for(int i=0; i<n; ++i){
if(prefixSum > u) break;
if(prefixSum <= l){
for(int j=0; j<=i; ++i){
ans.push_back(a[j].second);
}
return ans;
}
ll v = 0, g = n-1;
while(v <= g){
int mid = v + (g - v) / 2;
if(prefixSum + suffix[mid] >= l && prefixSum + suffix[mid] <= u){
for(int j=0; j<i; ++j){
ans.push_back(a[j].second);
}
for(int j=mid+1; j<n; ++j){
ans.push_back(a[j].second);
}
return ans;
} else if(prefixSum + suffix[mid] > u){
v = mid + 1;
} else {
g = mid - 1;
}
}
prefixSum += a[i].first;
}
return ans;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, l, u;
cin >> n >> l >> u;
vector<int> w(n);
for(int i=0; i<n; ++i){
cin >> w[i];
}
cout << find_subset(l, u, w) << endl;
return 0;
}
Compilation message (stderr)
molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:16:28: error: expected ')' before 'i'
16 | a.emplace_back(w[i] i);
| ~ ^~
| )
molecules.cpp:24:33: error: no match for 'operator+' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'})
24 | suffix[i] = suffix[i+1] + a[i];
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from molecules.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:585:5: note: candidate: 'template<class _Iterator> constexpr std::reverse_iterator<_IteratorL> std::operator+(typename std::reverse_iterator<_IteratorL>::difference_type, const std::reverse_iterator<_IteratorL>&)'
585 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:585:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'const std::reverse_iterator<_IteratorL>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/bits/stl_algobase.h:67,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from molecules.cpp:1:
/usr/include/c++/11/bits/stl_iterator.h:1700:5: note: candidate: 'template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)'
1700 | operator+(typename move_iterator<_Iterator>::difference_type __n,
| ^~~~~~~~
/usr/include/c++/11/bits/stl_iterator.h:1700:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'const std::move_iterator<_IteratorL>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6095:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
6095 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6095:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:56,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.tcc:1169:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
1169 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.tcc:1169:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const _CharT*' and 'long long int'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:56,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.tcc:1189:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
1189 | operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.tcc:1189:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
6132 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6132:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6148:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
6148 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6148:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6160:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
6160 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6160:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6166:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
6166 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6166:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6172:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
6172 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6172:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6194:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
6194 | operator+(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6194:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const _CharT*' and 'long long int'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6200:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(_CharT, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&)'
6200 | operator+(_CharT __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6200:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6206:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, const _CharT*)'
6206 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6206:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6212:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&&, _CharT)'
6212 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6212:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/complex:332:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator+(const std::complex<_Tp>&, const std::complex<_Tp>&)'
332 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/11/complex:332:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::complex<_Tp>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/complex:341:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator+(const std::complex<_Tp>&, const _Tp&)'
341 | operator+(const complex<_Tp>& __x, const _Tp& __y)
| ^~~~~~~~
/usr/include/c++/11/complex:341:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::complex<_Tp>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/complex:350:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator+(const _Tp&, const std::complex<_Tp>&)'
350 | operator+(const _Tp& __x, const complex<_Tp>& __y)
| ^~~~~~~~
/usr/include/c++/11/complex:350:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'const std::complex<_Tp>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/complex:451:5: note: candidate: 'template<class _Tp> constexpr std::complex<_Tp> std::operator+(const std::complex<_Tp>&)'
451 | operator+(const complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/11/complex:451:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::complex<_Tp>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:405:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::_Expr<_Dom2, typename _Dom2::value_type>&)'
405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:405:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:405:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__plus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const typename _Dom::value_type&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:405:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const std::_Expr<_Dom1, typename _Dom1::value_type>&, const std::valarray<typename _Dom::value_type>&)'
405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/c++/11/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/bits/valarray_after.h:405:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const std::valarray<typename _Dom::value_type>&, const std::_Expr<_Dom1, typename _Dom1::value_type>&)'
405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/valarray:1186:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const std::valarray<_Tp>&, const std::valarray<_Tp>&)'
1186 | _DEFINE_BINARY_OPERATOR(+, __plus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1186:1: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::valarray<_Tp>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/valarray:1186:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const std::valarray<_Tp>&, const typename std::valarray<_Tp>::value_type&)'
1186 | _DEFINE_BINARY_OPERATOR(+, __plus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1186:1: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: mismatched types 'const std::valarray<_Tp>' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
24 | suffix[i] = suffix[i+1] + a[i];
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
from molecules.cpp:1:
/usr/include/c++/11/valarray:1186:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__plus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const typename std::valarray<_Tp>::value_type&, const std::valarray<_Tp>&)'
1186 | _DEFINE_BINARY_OPERATOR(+, __plus)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/valarray:1186:1: note: template argument deduction/substitution failed:
molecules.cpp:24:38: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} is not derived from 'const std::valarray<_Tp>'
24 | suffix[i] = suffix[i+1] + a[i];
| ^
molecules.cpp:35:20: error: could not convert 'ans' from 'vector<long long int>' to 'vector<int>'
35 | return ans;
| ^~~
| |
| vector<long long int>
molecules.cpp:50:24: error: could not convert 'ans' from 'vector<long long int>' to 'vector<int>'
50 | return ans;
| ^~~
| |
| vector<long long int>
molecules.cpp:60:12: error: could not convert 'ans' from 'vector<long long int>' to 'vector<int>'
60 | return ans;
| ^~~
| |
| vector<long long int>
molecules.cpp: In function 'int main()':
molecules.cpp:76:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<int>')
76 | cout << find_subset(l, u, w) << endl;
| ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~
| | |
| | std::vector<int>
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/11/istream:39,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/ostream:108:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
108 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/11/ostream:108:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
108 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/ostream:117:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]'
117 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/11/ostream:117:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
117 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/11/ostream:127:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
127 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/11/ostream:127:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
127 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/11/ostream:166:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
166 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/11/ostream:166:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int'
166 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/11/ostream:170:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
170 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/11/ostream:170:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int'
170 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/11/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
174 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/11/ostream:174:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool'
174 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/11/ostream:829,
from /usr/include/c++/11/istream:39,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/ostream.tcc:91:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
91 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ostream.tcc:92:22: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int'
92 | operator<<(short __n)
| ~~~~~~^~~
In file included from /usr/include/c++/11/istream:39,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/ostream:181:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
181 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/11/ostream:181:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int'
181 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/11/ostream:829,
from /usr/include/c++/11/istream:39,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/ostream.tcc:105:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
105 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ostream.tcc:106:20: note: no known conversion for argument 1 from 'std::vector<int>' to 'int'
106 | operator<<(int __n)
| ~~~~^~~
In file included from /usr/include/c++/11/istream:39,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/ostream:192:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
192 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/11/ostream:192:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int'
192 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/11/ostream:201:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
201 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/11/ostream:201:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int'
201 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/11/ostream:205:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
205 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/11/ostream:205:37: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int'
205 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/ostream:220:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
220 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/11/ostream:220:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'double'
220 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/11/ostream:224:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
224 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/11/ostream:224:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'float'
224 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/11/ostream:232:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
232 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/11/ostream:232:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double'
232 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/11/ostream:245:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]'
245 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/11/ostream:245:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'const void*'
245 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/11/ostream:250:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]'
250 | operator<<(nullptr_t)
| ^~~~~~~~
/usr/include/c++/11/ostream:250:18: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::nullptr_t'
250 | operator<<(nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/11/ostream:829,
from /usr/include/c++/11/istream:39,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/ostream.tcc:119:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]'
119 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ostream.tcc:120:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_ostream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
120 | operator<<(__streambuf_type* __sbin)
| ~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/11/regex:63,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
from molecules.cpp:1:
/usr/include/c++/11/bits/regex.h:1671:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::sub_match<_Bi_iter>&)'
1671 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/11/bits/regex.h:1671:5: note: template argument deduction/substitution failed:
molecules.cpp:76:32: note: 'std::vector<int>' is not derived from 'const std::__cxx11::sub_match<_Bi_iter>'
76 | cout << find_subset(l, u, w) << endl;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:45,
from molecules.cpp:1:
/usr/include/c++/11/cstddef:126:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(std::byte, _IntegerType)'
126 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/11/cstddef:126:5: note: template argument deduction/substitution failed:
molecules.cpp:76:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
76 | cout << find_subset(l, u, w) << endl;
| ^~~~
In file included from /usr/include/c++/11/bits/basic_string.h:48,
from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/string_view:667:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::basic_string_view<_CharT, _Traits>)'
667 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/11/string_view:667:5: note: template argument deduction/substitution failed:
molecules.cpp:76:32: note: 'std::vector<int>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
76 | cout << find_subset(l, u, w) << endl;
| ^
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/bits/basic_string.h:6531:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
6531 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/11/bits/basic_string.h:6531:5: note: template argument deduction/substitution failed:
molecules.cpp:76:32: note: 'std::vector<int>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
76 | cout << find_subset(l, u, w) << endl;
| ^
In file included from /usr/include/c++/11/bits/ios_base.h:46,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from molecules.cpp:1:
/usr/include/c++/11/system_error:279:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)'
279 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/11/system_error:279:5: note: template argument deduction/substitution failed:
molecules.cpp:76:24: note: cannot convert 'find_subset(int, int, std::vector<int>)(u, std::vector<int>(w))' (type 'std::vector<int>') to type 'const std::error_code&'
76 | cout << find_subset(l, u, w) << endl;
| ~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/11/istream:39,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/inc