# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1205734 | batsukh2006 | Hack (APIO25_hack) | C++17 | 2 ms | 1972 KiB |
#include "hack.h"
#include <vector>
#include<iostream>
using namespace std;
const int mxN=100000;
int hack(){
vector<long long> x;
for(int i=0; i<mxN; i++) x.push_back(i);
long long v=collisions(x);
for(int i=1; i<=mxN; i++){
long long f=mxN/i;
long long a=f*(f-1)/2*i;
a+=mxN%i*f;
if(a==v) return i;
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |