| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1215149 | Bzslayed | Hack (APIO25_hack) | C++20 | 930 ms | 24280 KiB |
#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... | ||||
