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 |
8885830--->8830 改为 88830 以及一点分析In Reply To:搞个数据集合,把提问的都给压倒 Posted by:majia001 at 2006-08-18 11:30:42 考虑三种情况 1.含有0 2.含有5 3.其他 首先,第3种情况直接输出impossible 其次,对于第一种情况,肯定有解,需分类 a.全0 b.sum mod 3 = 1 (sum=原始各位数和) c.sum mod 3 = 2 d.other(output 0) 最后,对于第二种情况,未必有解,需分类 a.单一5 b.同上 c.同上 d.other(output impossible) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator