参考代码 #include<iostream> #include<vector> using namespace std; bool check(int speed, int total, int N, vector<int> P)</