제출 #541844

#제출 시각아이디문제언어결과실행 시간메모리
541844tabr코끼리 (Dancing Elephants) (IOI11_elephants)C++17
0 / 100
2 ms468 KiB
#include <bits/stdc++.h> using namespace std; #ifdef tabr #include "library/debug.cpp" #else #define debug(...) #endif const int N = 150015; int B; int n; int l; int x[N]; int cnt; void init(int n_, int l_, int x_[]) { n = n_; l = l_; B = (int) sqrt(n_); for (int i = 0; i < n; i++) { x[i] = x_[i]; } } void build() { } int update(int i, int y) { if (cnt == 0) { build(); } cnt++; if (cnt == n / B) { cnt = 0; } } #ifdef tabr int main() { ios::sync_with_stdio(false); cin.tie(0); return 0; } #endif

컴파일 시 표준 에러 (stderr) 메시지

elephants.cpp: In function 'int update(int, int)':
elephants.cpp:36:1: warning: no return statement in function returning non-void [-Wreturn-type]
   36 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...