# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72994 | edisonhello | Scales (IOI15_scales) | C++14 | 893 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<bits/stdc++.h>
using namespace std;
#ifndef WEAK
#include"scales.h"
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreturn-type"
int coins[6],pos[6],qtime;
int Init(){ return 1; }
void orderCoins(){
cout<<"orderCoins: "<<endl;
for(int i=0;i<6;++i)cin>>coins[i],pos[coins[i]]=i;
}
void answer(int *a){
cout<<"answer: ";
for(int i=0;i<6;++i)cout<<a[i]<<" "; cout<<endl;
cout<<"Query "<<qtime<<" times"<<endl;
}
int getHeaviest(int i,int j,int k){
++qtime;
cout<<"getHeaviest "<<i<<" "<<j<<" "<<k<<endl;
if(pos[i]>pos[j] && pos[i]>pos[k])return i;
if(pos[j]>pos[i] && pos[j]>pos[k])return j;
if(pos[k]>pos[i] && pos[k]>pos[j])return k;
}
int getLightest(int i,int j,int k){
++qtime;
cout<<"getLightest "<<i<<" "<<j<<" "<<k<<endl;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |