# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
836087 | _martynas | Minerals (JOI19_minerals) | C++14 | 78 ms | 9828 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 "minerals.h"
#include <bits/stdc++.h>
using namespace std;
set<int> in;
map<int, int> M;
/*
solve(A, B)
A -> C D
B -> E F
solve(C, E), solve(D, F)
*/
void solve(set<int> A, set<int> B) {
assert(A.size() == B.size());
if(A.empty()) return;
if(A.size() == 1) {
M[*A.begin()] = *B.begin();
return;
}
if(!in.empty()) {
// todo: optimize to not take out needed minerals
for(int x : in) Query(x);
in.clear();
}
auto ita = A.begin();
set<int> C, D, E, F;
int resp;
int split = A.size()/2;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |