Submission #1339806

#TimeUsernameProblemLanguageResultExecution timeMemory
1339806thesentroHack (APIO25_hack)C++20
0 / 100
155 ms428 KiB
#include "hack.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll x, ll y)
{
    if (y==0)
        return x;
    return gcd(y, x%y);
}
int hack(){
    // std::vector<long long> x = {1, 2, 3};
    // long long a = collisions(x);
    // long long b = collisions({92, 65});
    ll g = 0;
    for (int i=1e6 ; i>1e6/2 ; i--)
    {
        ll val = i;
        ll l = 1e6+1;
        ll r = l+i;
        if (collisions({l, r})==0) continue;
        g = gcd(g, i);
    }
    return g;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...