Submission #433273

# Submission time Handle Problem Language Result Execution time Memory
433273 2021-06-19T11:31:38 Z tengiz05 Jelly Flavours (IOI20_jelly) C++17
Compilation error
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