Submission #1282057

#TimeUsernameProblemLanguageResultExecution timeMemory
1282057riraFestival (IOI25_festival)C++20
Compilation error
0 ms0 KiB
#include "festival.h"
#include<bits/stdc++.h>
using namespace std;

std::vector<int> max_coupons(int A, std::vector<int> P, std::vector<int> T) {
	
	vector<int> ans,g=P;
	int l=A;
	int n=g.size();
	pair<int,int> k[n];
	for(int i=0;i<n;i++){
		k[i]={g[i],i};
	}
	sort(k,k+n);
	int i=0;
	while(k[i].first<=l&&i<n){
		l-=k[i].first;
		ans.push_back(k[i].second);
		i++;
	}
	return ans;
}
}

Compilation message (stderr)

festival.cpp:23:1: error: expected declaration before '}' token
   23 | }
      | ^