Submission #1055038

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10550382024-08-12 14:11:24Faisal_SaqibScales (IOI15_scales)C++17
56.25 / 100
1 ms440 KiB
#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];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

scales.cpp:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
scales.cpp: In function 'void init(int)':
scales.cpp:11:15: warning: unused parameter 'T' [-Wunused-parameter]
   11 | void init(int T)
      |           ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...