Ad
  • Default User Avatar

    thanks for the help. I restricted the number of loops, output everything to console and spotted mmy mistake. Took a while to work around it and it's probably ugly AF but it works. Pleased.

  • Default User Avatar

    on Complex 3 on C++ i get:a:1,b:0,c:0,d:1.

  • Custom User Avatar

    with out knowing what the failing test is

    No feedback when printing the input to the console? Then declare a static counter somewhere, update it at each call of your code, and make your solution throw an error just after you printed the critical input. (hopefully, the tests are executed in order...? :s )

  • Default User Avatar

    only got one loop which holds true while the program counter (pc) -pretentious I know - is less than the length of the program which means it carries out the final command on length -1, incements and then stops. I put several console outputs in the program and spotted a nested if that wasn't properly nested but even after fixing that it still times out. I trace tabled it and it's fine but with out knowing what the failing test is I have no chance of guessing where my error is. Logically it seems to work but clearly doesn't. I don't seem to be able to hit the buffer limit so can't get an ut put from the final tests. Frustrating

  • Custom User Avatar

    seek for an infinite loop.

    hint: on cw, the best way to track those is to print some stuff to the console from within each of your loops (something different for each one of them). This way, you'll reach the buffer limit error before the timeout, and you'll be able to identify the loop that is causing trouble.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    A monster, but, hey...it works. Celebrate your monster and ignore the doubters

  • Default User Avatar

    Mine is defo O to n. One loop, one pass per value. Still times out. I can't see a more simple solution without using some esoteric C# weirdness.

  • Default User Avatar

    finally someone else who coded it as complicated as I did...LOL