| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1361676 | kalkaper | Hack (APIO25_hack) | C++20 | 421 ms | 428 KiB |
#include "hack.h"
#include <vector>
#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ll long long
using namespace std;
int hack(){
vector<ll> x;
// vector<bool> checked(1000001,false);
x.pb(1);
ll ret;
for(ll i=2;i<=1000002;i+=3){
//anggap sizenya i
ll tes=lcm(i,lcm(i+1,i+2));
x.pb(tes+1);
ret=collisions(x);
if(ret){
// cerr<<i<<' '<<tes<<endl;
x.pop_back();
for(ll j=2;j*j<=tes;j++){
if(tes%j!=0)continue;
// cerr<<j<<endl;
x.pb(j+1);
ret=collisions(x);
if(ret)return j;
x.pop_back();
}
// x.pop_back();
// x.pb(i+1);
// ret=collisions(x);
// if(ret)return i;
}
else{
x.pop_back();
}
}
return 1000000000;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
