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 |
终于AC了。。。。这题真是坑爹。。。。 注意一下几个方面可能让你的程序WA (1)、排序后r相同的,要按l再从小到大再排一遍 (2)、输入所有l,r要+1 (3)、l,r相同的不能计算 对应的几组数据: (1) IN: 8 9 18 9 19 5 6 4 5 10 15 3 5 5 12 9 14 0 OUT: 1 0 1 1 2 0 0 2 (2) IN: 8 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 OUT:7 6 5 4 3 2 1 0 (3) IN: 8 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 0 OUT:0 0 0 0 0 0 0 0 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator