|
|
Show all threads Hide all threads Show all messages Hide all messages | the conditions of the problem | _JackDaniel's | 1461. Christmas Garland | 16 Aug 2022 07:49 | 2 | Why is the correct answer in the example "uhhdud" and not "uhdudh"? in terms of lexicographic order, this combination is closer to the original data. It's not next in the book, it's before. d < h < u | To admins: incorrect limitations. | Sergey Lazarev (MSU TB) | 1461. Christmas Garland | 31 May 2009 23:03 | 2 | There is no correct input for N=1. | Strange printf behavior | it4.kp | 1461. Christmas Garland | 12 Aug 2008 04:17 | 11 | Strange but when i use printf("%s",s.c_str()); I get WA on test 11, but if change it to cout<<s; it's become AC. Can somebody tell me why? Well, I got WA 3 during the contest but I'm pretty sure my idea is right, ahy tests ? I first, have WA3 too. That was because I misunderstood the problem statement... I thought that there cannot be two consecutive segments with y=0 which is wrong. Please help me. I still get WA on test 3 I'm a loser :( Edited by author 31.07.2007 15:38 I don't know why you have WA, but even if you fix all your bugs you definetly get TLE, since next_permutation works in exponential time and the length of string could be 100000! Give me some tests please I've WA #3 P.S. And what about tests with N = 1? Here are some tests Test 1: 4 uudd Answer 1: No solution Test 2: 4 uhhd Answer 2: uudd Test 3: 8 udududud Answer 3: ududuhhd Test 4: 32 uuuuuuuuuudddddduuuuuudddddddddd Answer 4: uuuuuuuuuudddddhdddddududududuhd Test 5: 41 uuuuuuduuuuuddddddduuuuuuuuuhdddddddddddd Answer 5: uuuuuuduuuuuddddddhddddududududududududud Test 6: 15 uuuuuuuhddddddd Answer 6: No solution p.s.: there is no tests with n=1. EDIT: Test 5 is correct now Edited by author 13.08.2006 22:01 Thanks for the tests, it turned out that I have misread the problem :(, anyway, thanks for your help Just feed output as input till it's "No solution" and see results. It might help finding bugs. | Be careful (+) | Dart MirzMan C++ Edition (Mirzoyan Alexey, Rybinsk SAAT) | 1461. Christmas Garland | 12 Jun 2007 18:54 | 1 | Be careful (+) Dart MirzMan C++ Edition (Mirzoyan Alexey, Rybinsk SAAT) 12 Jun 2007 18:54 AAAAAAAAAAAAAAAAA! My wrong program output "No sollution" instead of "No solution"!!! And I has WAed 2 by 4 times! I tried to solve this task on the contest, but has found this bug just now! |
|
|
|