- 陶陶摘苹果
- 2017-07-29 21:50:54 @
#include <queue>
#include <iostream>
#include <algorithm>
using namespace std;
int main ()
{
priority_queue<int,vector<int>,greater<int> > pq;
int n,x,sum=0;
for(int i=0;i<10;i++)
{
cin>>x;
pq.push(x);
}
cin>>x;
while(pq.size()>1)
{
if(x+30>=pq.top())
sum++;
else
break;
pq.pop();
}
cout<<sum;
return 0;
}
0 条评论
目前还没有评论...