//按照降序排列,而且队列中只保存k个元素 #include<stdio.h> #include<queue> using namespace std; int main(){ int n,k; while(~scanf("%d%d",&n,&k)){ priority_queue<int,vector<int>,greater<i
题目 C - Travel along the Line ZOJ - 4006 BaoBao is traveling along a line with infinite length.At the beginning of his trip, he is standing at position 0. At the beginning of each second, if he is st