# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1165253 | SmuggingSpun | Scales (IOI15_scales) | C++20 | 497 ms | 628 KiB |
#include<bits/stdc++.h>
#include "scales.h"
using namespace std;
const int INF = 1e9;
template<class T>void minimize(T& a, T b){
if(a > b){
a = b;
}
}
void init(int T){}
int W_ans[6];
void __answer(const vector<int>& ans){
for(int i = 0; i < 6; i++){
W_ans[i] = ans[i];
}
answer(W_ans);
}
bool update_min(pair<vector<vector<int>>, int>& best, pair<vector<vector<int>>, int>candidate){
if(best.first.size() > candidate.first.size() || (best.first.size() == candidate.first.size() && best.second > candidate.second)){
swap(best, candidate);
return true;
}
return false;
}
void update_max(vector<vector<int>>& best, vector<vector<int>>candidate){
if(best.size() < candidate.size()){
swap(best, candidate);
}
}
vector<vector<int>>candidate;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |