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 yayu_myself at 2008-09-21 14:56:03 on Problem 2328
#include<stdio.h>
#include<string.h>

main()
{
    int upper,lower;
    int i;
    char s[2][15];
    upper=11;
    lower=0;
    while(scanf("%d",&i))
    {
       if(!i) break;
       scanf("%s%s",s[0],s[1]);
       if(!strcmp(s[1],"high")) upper=i;
       else
          if(!strcmp(s[1],"low")) lower=i;
       else
          if(!strcmp(s[1],"on"))
          {
             if(upper<=lower+1||i>=upper||i<=lower)
                printf("Stan is dishonest\n");
             else
                printf("Stan may be honest\n");
             upper=11;lower=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