제출 #1205734

#제출 시각아이디문제언어결과실행 시간메모리
1205734batsukh2006Hack (APIO25_hack)C++17
0 / 100
2 ms1972 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) 메시지

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