# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1055038 | Faisal_Saqib | Scales (IOI15_scales) | C++17 | 1 ms | 440 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.
#pragma once
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count());
void answer(int C[]);
int getMedian(int A, int B, int C);
int getHeaviest(int A, int B, int C);
int getLightest(int A, int B, int C);
int getNextLightest(int A, int B, int C, int D);
void init(int T)
{
}
void orderCoins()
{
int ap[6];
for(int i=0;i<6;i++)
ap[i]=i+1;
shuffle(ap,ap+6,RNG);
int mx=getHeaviest(ap[0],ap[1],ap[2]);
int mi=getLightest(ap[0],ap[1],ap[2]);
int mx1=getHeaviest(ap[3],ap[4],ap[5]);
int mi1=getLightest(ap[3],ap[4],ap[5]);
int md=ap[0]+ap[1]+ap[2]-mx-mi;
int md1=ap[3]+ap[4]+ap[5]-mx1-mi1;
int a[3];
a[0]=mi;
a[1]=md;
a[2]=mx;
int b[3];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |