Submission #1307469

#TimeUsernameProblemLanguageResultExecution timeMemory
1307469ThylOneHack (APIO25_hack)C++20
0 / 100
28 ms4384 KiB
#include "hack.h"
#include <bits/stdc++.h>

using namespace std;


int hack(){
    const int MAXN = 1e6+1;
    int low  = 2;
    int high = 5e5;
    int cost = 0;
    while((high-low)>1){
        int mid = (low+high)/2;
        vector<long long> x;
        x.push_back(1);
        for(int i = low ; i <= mid+1; i++)
            x.push_back(i);
        cost += x.size();
        if(collisions(x)){
            high = mid;
        }else{
            low = mid;
        }
    }
    return low+1;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...