# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1014099 | MarwenElarbi | Teams (IOI15_teams) | C++17 | 0 ms | 0 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 "graderlib.c"
using namespace std;
void init(int T) {
return;
}
void orderCoins() {
int a=getLightest(1,2,3);
int b=getLightest(4,5,6);
int c=getHeaviest(1,2,3);
int d=getHeaviest(4,5,6);
vector<int> ans(6);
ans[5]=getHeaviest(d,c,a);
ans[0]=getLightest(a,b,c);
int mida,midb;
for (int i = 1; i <= 3; ++i)
{
if(i!=c&&i!=a) mida=i;
}
for (int i = 4; i <= 6; ++i)
{
if(i!=b&&i!=d) midb=i;
}
if(ans[5]==c) swap(c,d);
if(ans[0]==b) swap(a,b);
ans[1]=getLightest(b,mida,midb);
ans[4]=getHeaviest(c,mida,midb);
if(ans[1]==mida) swap(b,mida);
if(ans[4]==midb) swap(c,midb);
ans[2]=getLightest(d,mida,midb);
ans[1]=getHeaviest(a,mida,midb);
answer(ans);
}
/*
int main() {
int T, i;
T = _getNumberOfTests();
init(T);
for (i = 1; i <= T; i++) {
_initNewTest();
orderCoins();
}
return 0;
}
*/