Submission #569467

#TimeUsernameProblemLanguageResultExecution timeMemory
569467TurkhuuRoad Closures (APIO21_roads)C++17
Compilation error
0 ms0 KiB
#include "roads.h" #include <bits/stdc++.h> std::vector<long long> minimum_closure_costs(int n, std::vector<int> u, std::vector<int> v, std::vector<int> w){ return vector<long long>(n, 0); }

Compilation message (stderr)

roads.cpp: In function 'std::vector<long long int> minimum_closure_costs(int, std::vector<int>, std::vector<int>, std::vector<int>)':
roads.cpp:4:10: error: 'vector' was not declared in this scope
    4 |   return vector<long long>(n, 0);
      |          ^~~~~~
roads.cpp:4:10: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
                 from roads.h:1,
                 from roads.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from roads.h:1,
                 from roads.cpp:1:
/usr/include/c++/10/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
roads.cpp:4:17: error: expected primary-expression before 'long'
    4 |   return vector<long long>(n, 0);
      |                 ^~~~
roads.cpp:4:17: error: expected ';' before 'long'
    4 |   return vector<long long>(n, 0);
      |                 ^~~~
      |                 ;
roads.cpp:4:26: error: expected unqualified-id before '>' token
    4 |   return vector<long long>(n, 0);
      |                          ^