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

为什么会WA!!明明数据都是正确的(是我哪里读错题了么……)

Posted by ecpkn13241089 at 2015-02-19 21:41:27 on Problem 2656 and last updated at 2015-02-19 21:41:43
#include "stdio.h"
int main(){
    int i,a,b,s=0,count=0,day;
    while(1){
        count=0;
        scanf("%d",&i);
        if(i==0)break; else{
            day=0;
            for(;i>0;i--){
                day++;
                scanf("%d%d",&a,&b);
                if((s<(a+b))&&((a+b)>8)){
                    count=day;
                    s=a+b;
                }
            }
        }
        printf("%d\n",count);
    }
}

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