제출 #1230104

#제출 시각아이디문제언어결과실행 시간메모리
1230104lioowFinding Routers (IOI20_routers)C++20
컴파일 에러
0 ms0 KiB
#include "routers.h" #include <vector> #include <cassert> #include <cstdio> #include <algorithm> using namespace std; #define pb push_back std::vector<int> find_routers(int l, int n, int q) { vector<int>ans(n+1); ans[0]=0; repp(i,1,n-1){ int l=ans[i-1]+1; int r=n-1; int an=-1; while(l<=r){ int mid=(l+r)/2; int nw=use_detector(mid); if(x>=i){ an=mid; r=mid-1; } else { if(x==i-1) lol=ans[i-1]+2*lol; l=mid+1; } } ans[i]=lol; } return ans; }

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

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:12:10: error: 'i' was not declared in this scope
   12 |     repp(i,1,n-1){
      |          ^
routers.cpp:12:5: error: 'repp' was not declared in this scope
   12 |     repp(i,1,n-1){
      |     ^~~~