# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
31175 | cscandkswon | Scales (IOI15_scales) | C++14 | 13 ms | 2068 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 <bits/stdc++.h>
using namespace std;
const int MAXQ=120;
const int MAXP=720;
struct Question{
int type, a, b, c, d;
} Q[MAXQ];
struct Permutation{
int A[7];
} P[MAXP];
int order[5000];
int getL(Permutation list, int a, int b, int c){
if(list.A[a]<list.A[b] && list.A[a]<list.A[c]) return 0;
else if(list.A[b]<list.A[c]) return 1;
return 2;
}
int getH(Permutation list, int a, int b, int c){
if(list.A[a]>list.A[b] && list.A[a]>list.A[c]) return 0;
else if(list.A[b]>list.A[c]) return 1;
return 2;
}
int getM(Permutation list, int a, int b, int c){
if(min(list.A[b], list.A[c])<list.A[a]&&list.A[a]<max(list.A[b], list.A[c])) return 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |