Submission #1366139

#TimeUsernameProblemLanguageResultExecution timeMemory
1366139djsksbrbfHack (APIO25_hack)C++20
25 / 100
780 ms16472 KiB
#include "hack.h"
#include <bits/stdc++.h>
using namespace std;
#include <vector>
typedef long long ll;
typedef long long ll;
int hack(){
   // assume 1e6
   vector <ll> v;
   for(int i = 1 ; i <=1e6 ; i++)v.push_back(i);
   ll x = collisions(v);
   
   for(ll i = 1 ; i <= (ll)1e6 ; i++){
      if (x == (i * (1000000 / i) * ((1000000 / i) - 1)) / 2 + (1000000 / i) * (1000000 % i))return i;
   }
}

Compilation message (stderr)

hack.cpp: In function 'int hack()':
hack.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...