제출 #1290358

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

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

routers.cpp: In function 'std::vector<int> find_routers(int, int, int)':
routers.cpp:17:17: error: 'class std::vector<int>' has no member named 'pb'
   17 |             ans.pb(x); return ans;
      |                 ^~
routers.cpp:21:1: warning: control reaches end of non-void function [-Wreturn-type]
   21 | }
      | ^