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 |
这题绝B有问题……int dfs(int n){ int i; if(n==0){ return 1; } for(i=6; i>0; i--){ if(value[i]>0 && n>=i){ value[i] --; if(dfs(n-i)) return 1; // value[i] ++; } } return 0; } 回溯恢复那行注释掉过了,不注释掉tle Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator