# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23840 | sampriti | Scales (IOI15_scales) | C++14 | 29 ms | 2404 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 "scales.h"
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <cassert>
using namespace std;
const int HEIGHT = 6;
vector<int> perms[720];
vector<vector<int> > ops;
int precalc[720][120];
int optima[HEIGHT + 1];
int best[HEIGHT][720];
int _getHeaviest(vector<int>& arr, int A, int B, int C) {
vector<int> arr2 = {arr[A], arr[B], arr[C]};
sort(arr2.begin(), arr2.end());
int ans = arr2[2];
if(ans == arr[A]) return A;
else if(ans == arr[B]) return B;
return C;
}
int _getLightest(vector<int>& arr, int A, int B, int C) {
vector<int> arr2 = {arr[A], arr[B], arr[C]};
sort(arr2.begin(), arr2.end());
int ans = arr2[0];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |