foo.cc:7:24: error: 'vector' has not been declared
7 | bool TravelPlan(int k, vector<int>& nums)
| ^~~~~~
foo.cc:7:30: error: expected ',' or '...' before '<' token
7 | bool TravelPlan(int k, vector<int>& nums)
| ^
foo.cc: In function 'bool TravelPlan(int, int)':
foo.cc:9:13: error: 'nums' was not declared in this scope
9 | int n = nums.size();
| ^~~~
foo.cc: In function 'int main()':
foo.cc:28:5: error: 'vector' was not declared in this scope
28 | vector<int> nums(n);
| ^~~~~~
foo.cc:4:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
3 | #include <unordered_map>
+++ |+#include <vector>
4 |
foo.cc:28:12: error: expected primary-expression before 'int'
28 | vector<int> nums(n);
| ^~~
foo.cc:29:40: error: 'nums' was not declared in this scope
29 | for (int i = 0; i < n; i++) cin >> nums[i];
| ^~~~
foo.cc:31:27: error: 'nums' was not declared in this scope
31 | cout << TravelPlan(k, nums) << "\n";
| ^~~~
[Hydro](https://hydro.ac)提供评测服务