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 |
终于过了说点问题吧,首先题目一定要多看,比较难看懂,那几类输出各自是基于什么条件首先要清楚 还有就是要在15步内得出结果,所以可以尝试80和8组成的字符串,这个答案是“can not be classified after 15 iterations”,一定要注意。 还有就是多次执行后的内存管理,千万别泄漏了,也千万别越界了。 最后感谢Ontheline,拿着你的程序,虽然我没有看代码,但是和我的程序的输出进行比对,最终找到了错误,多谢多谢。 最后,提供几个输入,我随即生成的,大家做个参考吧,呵呵 0000 0001 0111 1111 123456789 456137892 123213241561 543265544536464364 5412314454766464364 543267685643564364 5423434560121016464364 -------------------------------- 0000 enters an inventory loop of length 2 0001 is self-inventorying after 8 steps 0111 is self-inventorying after 8 steps 1111 is self-inventorying after 8 steps 123456789 is self-inventorying after 5 steps 456137892 is self-inventorying after 5 steps 123213241561 enters an inventory loop of length 2 543265544536464364 enters an inventory loop of length 2 5412314454766464364 is self-inventorying after 3 steps 543267685643564364 enters an inventory loop of length 2 5423434560121016464364 is self-inventorying after 3 steps Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator