| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
好水的题。。 s = 16200 / v + t 输出t>=0最小s值就行这人肯定和出发时间不小于0的人中最先到的人一起到 说精度问题的 把式子化简一下不好吗。。取ceil也没必要用浮点数 然后发现vs有毒 复制样例进去居然直接无视掉了【tab】把vt连到一起了 导致读入数据不能 写完样例没过成就提交了居然0ms的ac了 还有排名里内存占用-4K的是什么鬼
#include<stdio.h>
#include<string.h>
int main()
{
int n, x, y, s, m;
while (scanf("%d", &n) && n)
{
m = 2333333;
while (n--)
{
scanf("%d%d", &x, &y);
if (y < 0) continue;
s = 16200 / x + y;
if (16200 % x) s++;
m = m > s ? s : m;
}
printf("%d\n",m); }
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator