Submission #221338

#TimeUsernameProblemLanguageResultExecution timeMemory
221338zoooma13Gap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" #include "gap.h" #include "grader.cpp" using namespace std; const long long MAX_A = 1e18; long long findGap(int T, int N){ long long lst = 0, mx_dist = 1; for(long long mn ,mx ,d=1; ; d<<=1){ MinMax(0 ,d ,&mn ,&mx); if(mn != -1){ lst = mn; break; } } for(int ok=1; ok; ) { for(long long mn,mx ,nxt=mx_dist; ok; nxt<<=1){ MinMax(lst+1 ,min(MAX_A ,lst+nxt) ,&mn ,&mx); if(lst+nxt >= MAX_A) ok = 0; if(mn != -1){ mx_dist = max(mx_dist ,mn-lst); lst = mx; break; } } } return mx_dist; }

Compilation message (stderr)

/tmp/ccL0PnJW.o: In function `MinMax(long long, long long, long long*, long long*)':
grader.cpp:(.text+0x0): multiple definition of `MinMax(long long, long long, long long*, long long*)'
/tmp/ccjhsyb2.o:gap.cpp:(.text+0x0): first defined here
/tmp/ccL0PnJW.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccjhsyb2.o:gap.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status