# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
45733 | RayaBurong25_1 | Scales (IOI15_scales) | C++17 | 104 ms | 892 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 <vector>
#include <algorithm>
#include <stdio.h>
typedef struct node node;
struct node
{
int q, a, b, c, d;
std::vector<int> V;
node* next[3];
};
node* root;
std::vector<int> Permu[720];
int compare(std::pair<int, int> a, std::pair<int, int> b)
{
return (a.first < b.first);
}
int answer(int P, int q, int a, int b, int c, int d)
{
// printf("answer P%d q%d a%d b%d c%d d%d\n", P, q, a, b, c, d);
int i;
// for (i = 0; i < 6; i++)
// printf("%d ", Permu[P][i]);
// printf("\n");
std::vector<std::pair<int, int> > W;
switch (q)
{
case 1:
W.push_back({Permu[P][a], 0});
W.push_back({Permu[P][b], 1});
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |