Submission #1290358

#TimeUsernameProblemLanguageResultExecution timeMemory
1290358antarbanikFinding Routers (IOI20_routers)C++20
Compilation error
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;
        }
    }   

}

Compilation message (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 | }
      | ^