The warning message means just that. It may mean you have included the output code in the wrong position or execute it wrongly, e.g.
you may have overwritten part of the original reading code,
the output has been printed more than once by mistake (e.g. in a loop),
you have skipped printing output in a certain round (e.g. you place your print statement in an “if” block, and as the “if” condition test fails that part never gets executed).
You may have to put more debug statements in your code to see whether the code is executed in the order expected by you.
The bug has to be on your side. If you reset the code (copy out your own code first!) and run the default code, the error will not appear.
Thank you very much for your quick answer.!
You were right, I had to modify one of the nested loops which contained an output statement.
Now I’m on 100%, ambush is the next target
I feel silly posting this, but I am thoroughly stumped. All tests pass in IDE, but on submission tests 2,3 and 4 pass, but the 1st simple test fails? I have no idea why the simple test is failing … This was done in C++.
If you click the “share and replay” button at the bottom of the replay player, a new replay window is opened. From there you can click the “…” button to see a bit more information.
I don’t know if my solution is a bit of a hack, but just test at each position if there is a link between this position and remove the link.
I’ve seen much more complex solutions, so I’m wondering
I confirm, this was the solution for me. Previously, when my loops didn’t return a link, then i was cutting by default the ‘0 1’ link. So it was cut several times in some cases. The errors came from that. So i created a ‘uncutLinks’ array containing all the links. And each time a link was cut, i removed it from the ‘uncutLinks’ array. Then when my loops didn’t return a link, i was cutting uncutLinks[0] (the first link in the list).
Thank to this, i passed all the test 100%.
I am providing an input though. I tried to hardcode the solution for the first test, but it still doesn’t work. All the other test cases work perfectly fine.
That may mean your hardcoded solution was never output. Maybe the condition to trigger it was not met, or the output code was not executed before reading the second round’s inputs. You may consider going through your code manually, line by line, to check where the logic may go wrong.
Hello, I’m solving the code in python, and I’m getting integers in the list that are supposed to show the links between each node (n1, n2). Don’t know how to proceed from here.
Could anybody give any hints regarding the 3rd achievement (severing 15 or less connections only on the last test)? I solved the problem 100% with 2 different solutions (a simple check of adjacency as well as a BFS-based one) but I can’t seem to wrap my head around that…