# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1165290 | SmuggingSpun | Scales (IOI15_scales) | C++20 | 655 ms | 41600 KiB |
#include<bits/stdc++.h>
#include "scales.h"
using namespace std;
template<class T>bool minimize(T& a, T b){
if(a > b){
a = b;
return true;
}
return false;
}
template<class T>void maximize(T& a, T b){
if(a < b){
a = b;
}
}
map<vector<vector<int>>, pair<vector<int>, int>>dp;
vector<vector<int>>cd;
void get_min_query(vector<vector<int>>& perm, const vector<int>& id, const int r){
cd.clear();
for(vector<int>& p : perm){
bool flag;
for(int& x : p){
if(x == id[0] || x == id[1] || x == id[2]){
flag = bool(x == id[r]);
break;
}
}
if(flag){
cd.emplace_back(p);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |