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:对石头个数取余,然后dfs过了。。但貌似有问题In Reply To:对石头个数取余,然后dfs过了。。但貌似有问题 Posted by:wander_alone at 2013-05-16 17:24:06 > 对个数取余 > int a[7]; > int b[7] = {1, 60, 30, 20, 15, 12, 10}; > for(i = 1; i < 7; i++) > a[i] = a[i] % b[i]; > > 然后dfs,AC了 > 但是测试这样一组数据: > 0 0 0 15 0 0 > > 结果为 > Can be divided. 把数组b改成b[7] = {1, 60, 30, 20, 30, 12, 10}; 就没问题了。。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator