Submission #1006782

# Submission time Handle Problem Language Result Execution time Memory
1006782 2024-06-24T08:33:51 Z Abito Longest Trip (IOI23_longesttrip) C++17
Compilation error
0 ms 0 KB
#include "longesttrip.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> longest_trip(int N, int D)
{
    vector<int> v;
    for (int i=0;i<N;i++) v.pb(i);
    return v;
}

Compilation message

longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:7:29: error: 'class std::vector<int>' has no member named 'pb'
    7 |     for (int i=0;i<N;i++) v.pb(i);
      |                             ^~