Submission #760871

#TimeUsernameProblemLanguageResultExecution timeMemory
760871Ahmed57Scales (IOI15_scales)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long void init(int T){ return ; } int getHeaviest(int A, int B, int C); int getLightest(int A, int B, int C); int getMedian(int A, int B, int C); int getNextLightest(int A, int B, int C, int D); void answer(int W[6]); void orderCoins(){ vector<int> rem; int ans[6] = {0}; for(int i = 1;i<=6;i++)rem.push_back(i); int x = getLightest(rem[0],rem[1],rem[2]); int y = getLightest(rem[3],rem[4],rem[5]); int z = getLightest(x,y,rem[rem.size()-1]); ans[0] = z; auto it = lower_bound(rem.begin(),rem.end(),z); rem.erase(it); x = getLightest(rem[0],rem[1],rem[2]); y = getLightest(rem[2],rem[3],rem[4]); z = getLightest(x,y,rem[rem.size()-1]); ans[1] = z; it = lower_bound(rem.begin(),rem.end(),z); rem.erase(it); x = getLightest(rem[0],rem[1],rem[2]); y = getLightest(rem[1],rem[2],rem[3]); z = getLightest(x,y,rem[rem.size()-1]); ans[2] = z; it = lower_bound(rem.begin(),rem.end(),z); rem.erase(it); z = getLightest(rem[0],rem[1],rem[2]); ans[3] = z; it = lower_bound(rem.begin(),rem.end(),z); rem.erase(it); z = getMedian(rem[0],rem[1],z); ans[4] = z; it = lower_bound(rem.begin(),rem.end(),z); rem.erase(it); ans[5] = z; answer(ans); }

Compilation message (stderr)

scales.cpp: In function 'void init(long long int)':
scales.cpp:5:15: warning: unused parameter 'T' [-Wunused-parameter]
    5 | void init(int T){
      |               ^
/usr/bin/ld: /tmp/ccPpRuEL.o: in function `orderCoins()':
scales.cpp:(.text+0x121): undefined reference to `getLightest(long long, long long, long long)'
/usr/bin/ld: scales.cpp:(.text+0x13a): undefined reference to `getLightest(long long, long long, long long)'
/usr/bin/ld: scales.cpp:(.text+0x14e): undefined reference to `getLightest(long long, long long, long long)'
/usr/bin/ld: scales.cpp:(.text+0x194): undefined reference to `getLightest(long long, long long, long long)'
/usr/bin/ld: scales.cpp:(.text+0x1ad): undefined reference to `getLightest(long long, long long, long long)'
/usr/bin/ld: /tmp/ccPpRuEL.o:scales.cpp:(.text+0x1c1): more undefined references to `getLightest(long long, long long, long long)' follow
/usr/bin/ld: /tmp/ccPpRuEL.o: in function `orderCoins()':
scales.cpp:(.text+0x2a3): undefined reference to `getMedian(long long, long long, long long)'
/usr/bin/ld: scales.cpp:(.text+0x2de): undefined reference to `answer(long long*)'
/usr/bin/ld: /tmp/cc3Hc8UJ.o: in function `main':
grader.c:(.text.startup+0x7e): undefined reference to `init'
/usr/bin/ld: grader.c:(.text.startup+0xfb): undefined reference to `orderCoins'
collect2: error: ld returned 1 exit status