| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1365104 | mannshah1211 | Festival (IOI25_festival) | C++20 | 52 ms | 6964 KiB |
#include "festival.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> max_coupons(int a, vector<int> p, vector<int> t) {
int n = p.size();
vector<array<int, 3>> pt(n);
for (int i = 0; i < n; i++) {
pt[i] = {p[i], t[i], i};
}
sort(pt.begin(), pt.end(), [&](array<int, 3> x, array<int, 3> y) {
if (x[1] == 1 && y[1] == 1) {
return (x[0] < y[0]);
}
int p1 = x[0], p2 = y[0], t1 = x[1], t2 = y[1];
return (static_cast<long long>(p1) * static_cast<long long>(t1) * static_cast<long long>(t2 - 1) < static_cast<long long>(p2) * static_cast<long long>(t2) * static_cast<long long>(t1 - 1));
});
vector<int> ans;
for (int i = 0; i < n; i++) {
ans.push_back(pt[i][2]);
}
return ans;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
