wzcs11 / aoapc-book

Automatically exported from code.google.com/p/aoapc-book
0 stars 0 forks source link

LA3938或UVA1400 - "Ray, Pass me the dishes!"代码有bug #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
题目:Root :: AOAPC I: Beginning Algorithm Contests -- Training Guide (Rujia 
Liu) :: Chapter 3. Data Structures :: Maintaining Interval Data :: 
Examples下的1400

测试案例:
499999 1
499999个1
1 499999

输出:
453688 499999

测速环境:
vs2013 + win8.1

问题是数组越界了,const int maxnode = 1000000 + 10; 
这个maxnode是错的。比如对于上面的案例,499998在线段树中对�
��的下标是1048573.

Original issue reported on code.google.com by hejianli...@gmail.com on 19 Oct 2014 at 1:49