| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1352390 | Trisanu_Das | Hack (APIO25_hack) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
#include "hack.h"
using namespace std;
#define ll long long
#define MAXN 1000000
int hack(){
vector<int> x;
for(int i = 1; i <= MAXN; i++) x.push_back(i);
int final = collisions(x);
for(int i = 1; i <= MAXN; i++){
int grp = MAXN / i;
int curr = (grp * (grp - 1) / 2) * i + (MAXN % i * grp);
if(curr == final) return i;
}
}