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

这个题,不能有 tle 的问题吧

Posted by sunmoonstar at 2006-03-06 12:41:22 on Problem 1326
In Reply To:This is my code. Why does it TLEed? Posted by:Failed_Exile at 2005-12-03 11:56:44
> #include <stdio.h>
> 
> int main()
> {
>   char c[100];
>   long int m,s;
>   while(getchar()!='#')
>   {
>     s=0;
>     while(getchar()!='0')
>     {
>       scanf("%s%s%ld",c,c,&m),getchar();
>       switch(getchar())
>       {
>         case 'F': s+=m+m; break;
>         case 'B': s+=m+(m+1)/2; break;
>         case 'Y': s+=(m>500)?m:500; break;
>       }
>       getchar();
>     }
>     getchar(),printf("%ld\n",s);
>   }
>   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