제출 #671687

#제출 시각아이디문제언어결과실행 시간메모리
671687Hacv16코끼리 (Dancing Elephants) (IOI11_elephants)C++17
컴파일 에러
0 ms0 KiB
#include "elephants.h" #include<bits/stdc++.h> typedef long long ll; const int MAX = 2e6 + 15; int n, l, x[MAX], ans; void init(int n_, int l_, int x_[]){ n = n_, l = l_; for(int i = 0; i < n; i++) x[i] = x_[i]; return; } int update(int i, int y){ x[i] = y; if(abs(x[0] - x[1]) > L) ans = 1; else ans = 2; return ans; }

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

elephants.cpp: In function 'int update(int, int)':
elephants.cpp:21:25: error: 'L' was not declared in this scope
   21 |   if(abs(x[0] - x[1]) > L) ans = 1;
      |                         ^