|
|
back to boardif n=1 What I must write if n=1? Please, give me answers for tests: 1 1 1 (yes, it's uncorrect ;) 1 2 1 1 3 1 1 4 4 Edited by author 08.04.2007 16:10 Re: if n=1 Hi evil cheater!:) my prog out 1 3 4 Re: if n=1 Hi, friend! =) My prog out 1 3 4 too, but I get WA#6. I using hash. You have any good (or evil :) tests for me? And what answers for this: 5 2 1 1 1 1 1 -> 22 4 12 1 5 3 5 11 -> 1781 5 45 18 33 1 1 45 -> 41312 n=2 -> s*s Edited by author 08.04.2007 20:31 :) I solved it! It's not hard as you think. Using hash, you must deleting 1-step queen places only. My time is 1.687 Thanks! Re: :) There're about 3e+6 positions before reduction to 1e+6. So, it's too compacted for hasing. You'll either get TLE or ML, or you're lucky :) My solution eats 2.4 sec, but it spends most of its time inside qsort. And I couldn't do any bucketing due to ML :( |
|
|