답안 #983689

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
983689 2024-05-15T23:15:55 Z Sofiatpc Jelly Flavours (IOI20_jelly) C++14
0 / 100
1 ms 348 KB
#include "jelly.h"
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 2005, MAX = 1e4+5;
int dp[MAXN][MAX];

int find_maximum_unique(int x, int y, vector<int> a, vector<int> b) {
	int n = a.size();

	sort(a.begin(),a.end());
	int l = 1, r = n;
	while(l!=r){
		int mid = (l+r+1)/2;

		int curx = x, cury = y;
		for(int i = mid-1; i >= 0; i--){
			if(curx > cury)curx -= a[i];
			else cury -= a[i];
		}
		if(curx >= 0 && cury >= 0)l = mid;
		else r = mid-1;
	}
	return l;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB 1st lines differ - on the 1st token, expected: '8', found: '5'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB 1st lines differ - on the 1st token, expected: '8', found: '5'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '689', found: '58'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB 1st lines differ - on the 1st token, expected: '62', found: '64'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 1 ms 344 KB Output is correct
12 Incorrect 1 ms 348 KB 1st lines differ - on the 1st token, expected: '0', found: '1'
13 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB 1st lines differ - on the 1st token, expected: '8', found: '5'
2 Halted 0 ms 0 KB -