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

Re:竟然在这题上载跟头了,BS一下自己…………

Posted by 1588760 at 2006-08-28 20:50:15 on Problem 2665
In Reply To:Re:竟然在这题上载跟头了,BS一下自己………… Posted by:fluke at 2006-05-20 15:21:27
> 也来BS我把。。。下面也是wa的代码。怎么通过率如此高?
> #include <stdio.h>
> 
> int main()
> {
>     int n, m;
>     while(scanf("%d %d", &n, &m) && n+m > 0)
>     {
>         n += 1;
>         int left = -1, right = -1;
>         scanf("%d %d", &left, &right);
>         int a, b;
>         for(int i=1;i<m;++i)
>         {
>             scanf("%d %d", &a, &b);
>             left = left <? a;
>             right = right >? b;
>         }
>         n -= right - left + 1;
>         printf("%d\n", n);
>     }
>     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