Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:竟然在这题上载跟头了,BS一下自己…………In Reply To:竟然在这题上载跟头了,BS一下自己………… Posted by:summery at 2006-04-22 13:16:21 也来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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator