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:为什么判断a[i]>a[i+1]和a[i]<a[i+1]即可??In Reply To:为什么判断a[i]>a[i+1]和a[i]<a[i+1]即可?? Posted by:hdu07t02 at 2007-07-27 19:54:43 我知道! 你可以画折线图; 前面比后面大 降 后面比前面大 升 且第一步只能升 这样 折点数就一定是 最后结果 假设后面某一点不是取与前面最近的折点作为前一个节点 那么它一定跳过了一个折点,这样得出的结果只能比正确的结果小! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator