Submission #1041682

#TimeUsernameProblemLanguageResultExecution timeMemory
1041682Ice_manScales (IOI15_scales)C++14
45.45 / 100
1 ms436 KiB
/**
 ____    ____    ____    __________________    ____    ____    ____
||I ||  ||c ||  ||e ||  ||                ||  ||M ||  ||a ||  ||n ||
||__||  ||__||  ||__||  ||________________||  ||__||  ||__||  ||__||
|/__\|  |/__\|  |/__\|  |/________________\|  |/__\|  |/__\|  |/__\|

*/

#include <iostream>
#include <chrono>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
#include "scales.h"

#define maxn 200005
#define maxr 25005
#define maxlog 20
#define INF 1000000010
#define LINF 100000000000000000
#define pb(x) push_back(x)
#define X first
#define Y second
#define control cout<<"passed"<<endl;

using namespace std;


typedef long long ll;
typedef pair <ll , ll> pll;
typedef pair <int , int> pii;
typedef long double ld;
typedef unsigned long long ull;
typedef vector <int> vi;




void init(int T)
{

    return;
}


int a[6];
void fix(int pos)
{
    int light = getLightest(a[pos] , a[pos - 1] , a[pos - 2]);
    if(a[pos] == light)
        swap(a[pos] , a[pos - 1]);
    if(a[pos - 1] == light)
        swap(a[pos - 1] , a[pos - 2]);
}



void orderCoins()
{
    for(int i = 0; i < 6; i++)
        a[i] = i + 1;

    vi q = {5 , 3 , 2 , 5 , 3 , 5 , 4 , 5};
    for(auto& e : q)
        fix(e);

    if(getHeaviest(a[4] , a[5] , a[0]) != a[5])
        swap(a[4] , a[5]);

    answer(a);
}










/**int main()
{

#ifdef ONLINE_JUDGE
    freopen("input.in", "r", stdin);
    freopen("output.out", "w", stdout);
#endif

    ///startT = std::chrono::high_resolution_clock::now();

    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);





    return 0;
}*/

Compilation message (stderr)

scales.cpp: In function 'void init(int)':
scales.cpp:40:15: warning: unused parameter 'T' [-Wunused-parameter]
   40 | void init(int T)
      |           ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...