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

其实还能更简洁的。。。

Posted by bool at 2006-02-01 13:16:56 on Problem 2656
#include<stdio.h>
int main()
{
 int n,a,b,tick,i,uh;
 while(tick=0,uh=0,scanf("%d",&n)&&n!=0)
 {
   for(i=0;i<n;i++)
     {
                   scanf("%d %d",&a,&b);
                   a+=b; 
                   if(a>uh&&a>8) {uh=a;tick=i+1;}
     }   
     printf("%d\n",tick);                       
 }
 return 0;    
} 

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