Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

负数直接忽略;不必在标题上加id,没效果的。

Posted by hawk at 2004-12-31 18:16:28 on Problem 1922
In Reply To:Hawk同学帮帮忙,负的数据在算的时候怎么删除呀? Posted by:00430030 at 2004-12-31 18:00:21
> 我的程序支队出发时间为正的情况正确:
> #include <stdio.h>
> #include <math.h>
> int f(int a,int b)
> {
>  float c;
>  c=4.5/a*3600+b;
>  return (int)c+1;
> }
> void main ()
> {
>      int a,x[10000],y[10000],z[10000],i,j,min;
>           scanf("%d",&a);
>           while(a!=0){
>            for(i=0;i<a;i++)
> {       scanf("%d %d",&x[i],&y[i]);
>          z[i]=f(x[i],y[i]);
> }
>          min=z[0];
>          for(j=1;j<a;j++)
>                  if(min>z[j])  min=z[j];
>                  printf("%d\n",min);
>                  scanf("%d",&a);
> }
> }

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator