# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
282087 | Pichon5 | Scales (IOI15_scales) | C++17 | 1 ms | 384 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>
#include "scales.h"
using namespace std;
void init(int T) {
/* ... */
}
void orderCoins() {
/* ... */
int W[] = {1, 2, 3, 4, 5, 6};
vector<pair<int,int> >v;
for(int i=0;i<=6;i++){
v.push_back({0,i});
}
for(int i=1;i<=6;i++){
for(int l=i+1;l<=6;l++){
if(i==l){
continue;
}
for(int j=l+1;j<=6;j++){
if(j==i or j==l){
continue;
}
int x=getHeaviest(i,l,j);
v[x].first++;
}
}
}
sort(v.begin(),v.end());
for(int i=1;i<=6;i++){
W[i-1]=v[i].second;
}
answer(W);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |