Submission #317919

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3179192020-10-30 19:57:06ivan_tudorJelly Flavours (IOI20_jelly)C++14
100 / 100
172 ms78900 KiB
#include "jelly.h"
#include <bits/stdc++.h>
using namespace std;
struct jelly{
int a, b;
};
const int N = 2005;
const int INF = INT_MAX;
jelly v[N];
bool cmpj(jelly a, jelly b){
return a.a < b.a;
}
bool cmpb(jelly a, jelly b){
return a.b < b.b;
}
int dp[N][10005];
int cost[N];
int find_maximum_unique(int x, int y, vector<int> a, vector<int> b) {
int n = a.size();
for(int i=1;i<=n;i++){
v[i] = {a[i-1], b[i-1]};
}
sort(v+ 1, v+n+1, cmpj);
for(int i =0; i <= n;i++){
for(int j = 0; j <= y;j++)
dp[i][j] = INF;
}
dp[0][0] = 0;
for(int i = 1; i<=n;i++){
for(int j = 0; j<=y; j++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...