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:为什么我把上线设置成65536而不是65535会wa?In Reply To:为什么我把上线设置成65536而不是65535会wa? Posted by:qipanfenge at 2012-05-15 16:59:52 > 为什么我把上线设置成65536而不是65535会wa? 我觉得应该是因为数组的上限不同,这题的数据比较神奇,65536正好是2^16,所以maxn=65535时需要开2^16*2=131072的数组,但是maxn=655536的时候需要开2^17*2=262144的数组,我是类似的问题错了好久,还是开严格4倍的数组比较保险ToT Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator