# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1154780 | KickingKun | Scales (IOI15_scales) | C++20 | 11 ms | 484 KiB |
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;
vector <int> ve[720];
int pos[720][7];
const int N = 6;
void init(int T) {
vector <int> p = {1, 2, 3, 4, 5, 6};
for (int i = 0; i < 720; i++) {
ve[i] = p;
for (int j = 0; j < 6; j++) pos[i][p[j]] = j;
next_permutation(p.begin(), p.end());
}
}
int res;
void solve(vector <int> &candidate) {
// cerr << candidate.size() << '\n';
if (candidate.size() == 1) {
res = candidate[0];
return;
}
int mi[4] = {int(2e9), int(2e9), int(2e9), int(2e9)};
vector <int> triple[4];
for (int a = 1; a <= 6; a++)
for (int b = a + 1; b <= 6; b++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |