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 |
提示一个可能的bug注意,在选好pos,置各种组合为false的时候,一定使用i+pos <= 20,否则会出界。虽然在自己电脑上能把官方的测试数据都过去,但是oj显示WA,而不是Runtime Error. bool tmp[25]; memcpy(tmp, s, 25); tmp[pos] = false; for(int i = 2; i+pos <= 20; i++){ if(!tmp[i]){ tmp[pos+i] = false; //不可选 } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator