제출 #1252069

#제출 시각아이디문제언어결과실행 시간메모리
1252069antarbanikFinding Routers (IOI20_routers)C++20
컴파일 에러
0 ms0 KiB
#include "routers.h" #include <bits/stdc++.h> using namespace std; vector<int> find_routers(int l, int n, int q){ vector<int> ans; ans.pb(0); for(int i = 1;i<=l;++i){ if(use_detector(i) == 0) continue; ans.pb((i-1)*2); } return ans; }

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

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:7:9: error: 'class std::vector<int>' has no member named 'pb'
    7 |     ans.pb(0);
      |         ^~
routers.cpp:11:13: error: 'class std::vector<int>' has no member named 'pb'
   11 |         ans.pb((i-1)*2);
      |             ^~