比赛 |
20150422 |
评测结果 |
AAAAAAAAAAAAAAA |
题目名称 |
奶牛跑步 |
最终得分 |
100 |
用户昵称 |
JSX |
运行时间 |
0.266 s |
代码语言 |
C++ |
内存使用 |
1.05 MiB |
提交时间 |
2015-04-22 10:00:33 |
显示代码纯文本
#include <cmath>
#include <cstdio>
#include <queue>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long LL;
template<class T>inline void Read(T& x) {
x = 0; bool flag = 0; char ch = getchar();
while(ch<'0'||ch>'9') { if(ch == '-') flag = 1; ch = getchar(); }
while('0'<=ch&&ch<='9') { x=x*10+ch-'0'; ch = getchar(); }
if(flag) x=-x;
}
#define maxn 100010
#define INF 1e18
int n = 0;
LL x = 0,y = 0,t = 0,pos[maxn];
int main() {
freopen("cowjoga.in","r",stdin);
freopen("cowjoga.out","w",stdout);
Read(n); Read(t);
for(int i = 1;i <= n;++ i) {
Read(x); Read(y);
pos[i] = x + y * t;
}
int ans = 0;
LL last = INF;
for(int i = n;i > 0;-- i) {
if(pos[i] < last) {
last = pos[i];
ans ++;
}
}
printf("%d\n",ans);
fclose(stdin);
fclose(stdout);
return 0;
}