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 |
直接生成结果。但还是需要30MS.In Reply To:当然可以 不过那样的时间复杂度是O(n^6) n=4 而且写起来也麻烦 此题有O(n^2)算法 n=4 Posted by:TheBeet at 2006-08-20 10:12:29 开一个4X4的Bool数组,开始全为false. 如果输入(i,j)处有"+",将该行该列取反。 最后有多少true就是最少步数。输出为true的坐标就是步骤。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator