# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
887332 | dubabuba | Let's Win the Election (JOI22_ho_t3) | C++14 | 498 ms | 756 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 10;
const int mxn = 550;
int a[mxn], n;
int b[mxn], k;
vector<int> good;
vector<int> badd;
double ans = 1e9;
void solve2(int map) {
vector<int> vote = badd;
vector<int> help;
double ret = 0.0;
for(int i = 0; i < good.size(); i++)
if(map & (1 << i))
help.push_back(good[i]);
else
vote.push_back(good[i]);
if(help.size() > k) return;
sort(help.begin(), help.end(), [&](int i, int j) { return b[i] < b[j]; });
sort(vote.begin(), vote.end(), [&](int i, int j) { return a[i] < a[j]; });
int helpers = 0;
for(int i : help) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |