Submission #802606

#TimeUsernameProblemLanguageResultExecution timeMemory
802606LiudasScales (IOI15_scales)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "scales.h"
using namespace std;
void orderCoins(){
    int arr[6];
    vector<int> b = {1,2,3,4,5,6};
    int ans = getHeaviest(1,2,3);
    int ans2 = getHeaviest(4, 5, 6);
    int ans3 = getHeaviest(ans, ans2, (ans == 3? 2: 3));
    arr[5] = ans3;
    if(ans == ans3){
        ans2 = getHeaviest(b[0], b[1], ans2);
    }
    else{
        ans2 = getHeaviest(b[3], b[4], ans);
    }
    b.erase(find(b.begin(), b.end(), ans3));
    b.erase(find(b.begin(), b.end(), ans2));
    arr[4] = ans;
    ans = getLightest(b[0],b[1],b[2]);
    ans = getLightest(ans, b[3], arr[5]);
    b.erase(find(b.begin(), b.end(), ans));
    arr[0] = ans;
    ans = getHeaviest(b[0],b[1],b[2]);
    arr[3] = ans;
    ans2 = getLightest(b[0],b[1],b[2]);
    arr[1] = ans2;
    b.erase(find(b.begin(), b.end(), ans));
    b.erase(find(b.begin(), b.end(), ans2));
    arr[2] = b[0];
    answer(arr);
}

Compilation message (stderr)

/usr/bin/ld: /tmp/cccH4iPb.o: in function `main':
grader.c:(.text.startup+0x7e): undefined reference to `init'
collect2: error: ld returned 1 exit status