답안 #433273

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
433273 2021-06-19T11:31:38 Z tengiz05 Jelly Flavours (IOI20_jelly) C++17
컴파일 오류
0 ms 0 KB
#include "jelly.h"
#include <vector>

int find_maximum_unique(int x, int y, std::vector<int> a, std::vector<int> b) {
	int n = a.size();
	sort(a.begin(), a.end());
	int ans = 0;
	for (int i = 0; i < n; i++) {
		if (x >= a[i]) {
			x -= a[i];
			ans++;
		}
	}
	return ans;
}

Compilation message

jelly.cpp: In function 'int find_maximum_unique(int, int, std::vector<int>, std::vector<int>)':
jelly.cpp:6:2: error: 'sort' was not declared in this scope; did you mean 'short'?
    6 |  sort(a.begin(), a.end());
      |  ^~~~
      |  short