#include "jelly.h"
#include <cstdio>
#include <cassert>
#include <vector>
#include<bits/stdc++.h>
using namespace std;
int find_maximum_unique(int x, int y, std::vector<int> arr, std::vector<int> brr) {
int n = arr.size();
vector<int>crr;
int dp [n+1][x+1+y+1];
memset(dp,0,sizeof dp);
for (int i =1;i<=n;++i){
for (int j =0;j<=x+y+1;++j){
dp[i][j] = max({(j-arr[i-1]>=0&&j<=x)?dp[i-1][j-arr[i-1]]+1:0,(j-brr[i-1]>x)?dp[i-1][j-brr[i-1]]+1:0,dp[i-1][j],dp[i][j]});
}
}
return dp[n][x+y]+dp[n][x];
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
1st lines differ - on the 1st token, expected: '8', found: '9' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
1st lines differ - on the 1st token, expected: '8', found: '9' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
17 ms |
13324 KB |
1st lines differ - on the 1st token, expected: '689', found: '116' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
121 ms |
81612 KB |
Output is correct |
2 |
Correct |
203 ms |
146440 KB |
Output is correct |
3 |
Correct |
206 ms |
144808 KB |
Output is correct |
4 |
Incorrect |
212 ms |
148192 KB |
1st lines differ - on the 1st token, expected: '1906', found: '3242' |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
104 ms |
79344 KB |
1st lines differ - on the 1st token, expected: '154', found: '195' |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
1st lines differ - on the 1st token, expected: '8', found: '9' |
2 |
Halted |
0 ms |
0 KB |
- |