Submission #1015124

# Submission time Handle Problem Language Result Execution time Memory
1015124 2024-07-06T06:25:04 Z vjudge1 Gap (APIO16_gap) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "grader.cpp"

using namespace std;

typedef long long ll;

ll findGap(int T, int N){
    if (T == 1){
        vector<ll> vec;
        ll mn = 0, mx = 1e18;
        while (N > 0){
            N -= 2;

            MinMax(mn, mx, &mn, &mx);

            vec.push_back(mn);
            vec.push_back(mx);
            
            mn++;
            mx--;
        }

        sort(vec.begin(), vec.end());
        
        ll res = 0;
        for (int i = 1; i < N; i ++)
            res = max(res, vec[i] - vec[i - 1]);
        return res;
    }
    return 0;
}

Compilation message

/usr/bin/ld: /tmp/ccEcRy2V.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/ccCcTsTT.o:gap.cpp:(.text+0x560): first defined here
/usr/bin/ld: /tmp/ccEcRy2V.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccCcTsTT.o:gap.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status