#include "hack.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mx = 1000000;
ll calc(ll x){
ll buc = mx/x;
ll ans = (buc*(buc-1)/2)*x;
ans += buc*(mx%x);
return ans;
}
int hack(){
vector<ll> v;
for (int i=1; i<=1000000; i++) v.push_back(i);
ll res = collisions(v);
static ll prec[1000005];
for (int i=1; i<=1000000; i++) prec[i] = calc(i);
for (int i=1; i<=1000000; i++){
if (res == prec[i]) return i;
}
return -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... |