#include #include #include #include int n, f; double s[100005]; int next[100005]; int prev[100005]; int speed[100005]; double last_time[100005]; bool ok[100005]; int done; using namespace std; struct hi { int pos; double time; }; bool comp(hi a, hi b) { return a.time > b.time; } int l = 0; vector heap; int main(){ while(scanf("%d %d", &n, &f)>=0){ int a; hi h, j; for(int i=0;i