| ||||||||||
| 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:请问有人能够将64的那组BT数据控制在1S之内么?In Reply To:请问有人能够将64的那组BT数据控制在1S之内么? Posted by:zentropy at 2007-09-02 16:03:34 > Input
> 64
> 40 40 30 35 35
> 26 15 40 40 40
> 40 40 40 40 40
> 40 40 40 40 40
> 40 40 40 43 42
> 42 41 10 4 40
> 40 40 40 40 40
> 40 40 40 40 40
> 40 40 40 25 39
> 46 40 10 4 40
> 40 37 18 17 16
> 15 40 40 40 40
> 40 40 40 40
> Output
> 454
>
> 虽然AC了,不过这组数据得6S左右,感觉再优化下去我会疯掉的。。这几天就一直在捣鼓这个题目,这个数据死活控制不住。。
我加了一个极限剪枝,就可以很快的跑出来了。
if (cnt>25000 ){
isfind=0;
return ;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator