/*
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define si short int
int main(void)
{
ll n;
string s;
cin>>n>>s;
ll brc=0;
while(s[brc]<=s[brc+1] && brc!=n-1)
brc++;
cout<<s.substr(0,brc)<<s.substr(brc+1,n-brc);
}
*/
/*
#include <bits/stdc++.h>
#define si short int
#define ll long long
using namespace std;
int main(void)
{
ll n;
cin>>n;
ll a[n+1];
ll naj[n+1]={0};
ll temp;
for(ll i=0;i<n;i++)
cin>>a[i];
for(ll i=0;i<n;i++)
{
ll pom[n+1]={0};
pom[a[i]]++;
naj[a[i]]++;
temp=a[i];
for(ll j=i+1;j<n;j++)
{
pom[a[j]]++;
if(pom[a[j]]>pom[temp] || (pom[a[j]]==pom[temp] && a[j]<temp))
temp=a[j];
naj[temp]++;
}
}
for(ll i=1;i<=n;i++)
cout<<naj[i]<<' ';
}
*/
/*
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define si short int
#define maxn 200005
ll k[maxn], d[maxn], a[maxn];
bool dbrs[maxn];
int main(void)
{
ll n, m;
cin>>n>>m;
for (ll i = 1; i <= n; ++i)
cin>>a[i];
ll p = 0;
for (ll i = 1; i <= m; ++i)
cin>>k[i], p += (k[i] > 0);
ll s = 0;
for (ll i = 1; i <= m; ++i)
d[i] = -k[i], s += d[i];
ll pom = maxn;
ll j = 1, dbr = 0;
for (ll i = 1; i <= n; ++i)
{
d[a[i]]++;
s++;
if (d[a[i]] >= 0 && !dbrs[a[i]] && k[a[i]] > 0)
dbrs[a[i]] = true, ++dbr;
while (j <= i && d[a[j]] > 0)
{
--s;
--d[a[j]];
++j;
}
if (dbr == p)
pom = min(pom, s);
}
if (pom == maxn) pom = -1;
cout<<pom;
}
*/
/*
pair<ll,ll> a[200010], q[200010];
ll d, n, m, l = 1, r = 0, sum=0;
int main(void)
{
brzina;
cin>>d>>n>>m;
for (ll i = 1; i <= m; i++)
cin>>a[i].first>>a[i].second;
sort(a + 1, a + m + 1);
a[m++].first = d;
ll sada = n, poz = 0, pom = 0;
for (ll i = 1; i <= m; i++)
{
while (a[i].first - poz > sada)
{
if (l > r)
cout<<"-1", exit(0);
ll temp = min(a[i].first - poz - sada, q[l].second - sum);
pom += temp*q[l].first;
sada += temp, sum += temp;
while (l <= r && q[l].second <= sum)
l++;
}
sada -= a[i].first - poz;
poz = a[i].first;
while (l <= r && a[i].second <= q[r].first)
r--;
q[++r].first = a[i].second;
q[r].second = n - sada + sum;
}
cout<<pom;
}
*/
/*
pair<ll, ll> a[200010], q[200010];
ll d, n, m, l = 1, r = 0, sum;
int main(void)
{
cin>>d>>n>>m;
for (int i = 1; i <= m; i++)
cin>>a[i].first>>a[i].second;
sort(a + 1, a + m + 1);
a[++m].first = d;
ll sada = n, poz = 0, pom = 0;
for (int i = 1; i <= m; i++)
{
while (a[i].first - poz > sada)
{
if (l > r)
{
cout<<"-1";
exit(0);
}
ll temp = min(a[i].first - poz - sada, q[l].second - sum);
pom += temp*q[l].first;
sada += temp, sum += temp;
while (l <= r && q[l].second <= sum) l++;
}
sada -= a[i].first - poz;
poz = a[i].first;
while (l <= r && a[i].second <= q[r].first) r--;
q[++r].first = a[i].second, q[r].second = n - sada + sum;
}
cout<<pom;
}
*/
/*
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define si short int
#define vi vector<ll>
#define vii vector<vector<ll>>
#define vip vector<pair<ll,ll>>
#define brzina ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
int main(void)
{
}
*/
//EEEEEEEZZZZZZZ//
/*
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define si short int
#define vi vector<ll>
#define vii vector<vector<ll>>
#define vip vector<pair<ll,ll>>
int main(void)
{
unsigned ll n,k,m;
scanf("%lld %lld %lld",&n,&k,&m);
unsigned ll a[n+2];
a[0]=1;
unsigned ll sum=0;
for(unsigned ll i=1;i<n;i++)
a[i]=a[i-1]*(i+1), cout<<a[i+1]<<' ';
for(unsigned ll i=0;i<n-1;i++)
{
unsigned ll j=i+1;
while(j!=n && j-i!=k+1)
{
sum+=a[j]/a[i];
j++;
}
}
cout<<endl;
cout<<sum;
}
*/
/*
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define si short int
#define vi vector<ll>
#define vii vector<vector<ll>>
#define vip vector<pair<ll,ll>>
int main()
{
int x;
cin>>x;
if(x==1) cout<<"-1";
else cout<<x<<' '<<x;
}
*/
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define si short int
#define vi vector<ll>
#define vii vector<vector<ll>>
#define vip vector<pair<ll,ll>>
int main(void)
{
ll n,l,u;
cin>>n>>l>>u;
ll w[n+1], max[n+1]={0};
for(ll i=1;i<=n;i++)
{
cin>>w[i];
if(i==0) max[i]=w[i];
else max[i]=max[i-1]+w[i];
}
for(ll i=1;i<=n-1;i++)
for(ll j=i+1;j<=n;j++)
{
if(max[j]-max[i-1]>=l && max[j]-max[i-1]<=u)
{
for(ll x=i;x<=j;x++) cout<<w[x]<<' ';
exit(0);
}
}
cout<<"0";
}
Compilation message
/tmp/ccCSYse8.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cchh9sp1.o:molecules.cpp:(.text.startup+0x0): first defined here
/tmp/ccCSYse8.o: In function `main':
grader.cpp:(.text.startup+0x152): undefined reference to `find_subset(int, int, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status