제출 #104529

#제출 시각아이디문제언어결과실행 시간메모리
104529figter001코끼리 (Dancing Elephants) (IOI11_elephants)C++17
컴파일 에러
0 ms0 KiB
// #include "grader.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; const int N = 1e5+50; const ll oo = 1e18; const ll mod = 1e9+7; int n,l; vector<int> a; void init(int N, int L, int X[]){ n = N; l=L; for(int i=0;i<n;i++) a.push_back(X[i]); } int update(int x, int y){ vector<int> tmp; for(int i=0;i<n;i++){ if(i == x) continue; if(a[i] >= y && y != -1){ tmp.push_back(y); y = -1; } tmp.push_back(a[i]); } if(tmp.size() != a.size()) tmp.push_back(y); a = tmp; int ans = 0;z` int to = -1; for(int it : a){ if(it > to){ to = it+l; ans++; } } return ans; }

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

elephants.cpp:36:15: error: stray '`' in program
  int ans = 0;z`
               ^
elephants.cpp: In function 'int update(int, int)':
elephants.cpp:36:14: error: 'z' was not declared in this scope
  int ans = 0;z`
              ^
elephants.cpp:39:11: error: 'to' was not declared in this scope
   if(it > to){
           ^~
elephants.cpp:39:11: note: suggested alternative: 'oo'
   if(it > to){
           ^~
           oo