#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 time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |