Ad
  • Custom User Avatar

    Hmmm, I did try using a PriorityQueue instead of the dictionary, but it was hell to work around the duplicate entries issue, so I gave up. Wish I'd spotted that a SortedSet would give me the same functionality.

  • Custom User Avatar

    This shouldn't pass the tests.

  • Custom User Avatar

    Yes, it works for all but the edge case of just reaching, where the 2 * int + 1 counts that as passing the window, where the floor doesn't. Took me a long time to work out why that was the case :(

  • Custom User Avatar

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

  • Custom User Avatar

    replying to Jon - surely the int value of the character is the ASCII value?

  • Custom User Avatar

    M is -- and I is .., so I assume the M/I thing is the next test along failing after the E / T thing.

  • Custom User Avatar

    The instructions were to ignore leading and trailing zeroes. When you do that the time signature for the first one is singular, for the second it's tripled.

  • Custom User Avatar

    I'm sure it's clever, but it's beyond my understanding lol

  • Custom User Avatar

    Thank God someone else came up with the sensible solution. I was beginning to despair looking through these.

  • Custom User Avatar

    Best Of Breed after looking at some of the other solutions?

    I didn't know you could pass Char.IsLetter like that, should have guessed since you can in Java. In Java, this is considered better practice, is it the same in C#?

  • Custom User Avatar

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

  • Custom User Avatar

    Why do the random tests (in C#, anyway) have negative numbers in the arrays?

  • Custom User Avatar

    I tidied this up (and converted it to C#) and it worked for me, not sure what's wrong when you run it.

  • Custom User Avatar

    I tried to do an int only solution, without stringifying and intifying. Bit of a faff around the factors when the square was double digits. Impractical to fix this using a factor of just 10 ** length(ret), because this becomes a nuisance for the first digit - also you use length, which was against the principle of just using ints.

  • Custom User Avatar

    Longer to work out what to do than to code it up :D

    Having said that, I didn't look anything up and I did it in less than an hour. I think people are looking at this and just throwing their hands up and saying that is too complicated.

    Here is a page of stars on a screene, can you position and rotate this overlay of stars to match? Might be a simpler way of putting it.

    (I just treated the third coordinate as if it were the z-coordinate, I doubt that that is true, but my solution still seems to work.)

  • Loading more items...