#include <bits/stdc++.h>
#define debug(x) cerr << #x << " = " << x << endl;
#define task ""
using namespace std;
int fdp[2001][10001], bdp[2001][10001], ans;
pair<int, int> c[2001];
int n;
int find_maximum_unique(int x, int y, vector<int> a, vector<int> b)
{
ans = 0;
n = a.size();
for (int i=0; i<n; i++) c[i] = make_pair(a[i], b[i]);
sort(c, c+n);
for (int i=1; i<=n; i++)
{
for (int j=0; j<=x; j++)
{
fdp[i][j] = fdp[i-1][j]+c[i-1].second;
if(j >= c[i-1].first)
{
fdp[i][j] = min(fdp[i][j], fdp[i-1][j-c[i-1].first]);
}
}
}
for(int i=n-1; i>=0; i--)
{
for (int j=0; j<y; j++)
{
bdp[i][j] = bdp[i+1][j];
if(j >= c[i].second)
{
bdp[i][j] = max(bdp[i][j], bdp[i+1][j-c[i].second]+1);
}
}
}
for (int i=0; i<=n; i++)
{
int yleft = y-fdp[i][x];
if(yleft >= 0) ans = max(ans, i+bdp[i][yleft]);
}
return ans;
}
int main()
{
//freopen(task".inp", "r", stdin);
//freopen(task".out", "w", stdout);
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
#ifdef dungctb
cerr << "Time collapse : " << fixed << setprecision(3) << 1.000*clock()/CLOCKS_PER_SEC;
#endif // dungctb
return 0;
}
Compilation message
/tmp/ccE666rR.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc5WioXa.o:jelly.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status