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

  • Thank you for your attention. There really was a mistake in the code, I fixed it.

  • I have another question about the reference solution:

    |FMFMHE DUVRQE   |
    |KTERCD KDAWVQ   |
    |JGOBIK OFXMHL JD|
    |NKE PCRQJT      |
    \XASWQ           /
     ---------------- 
     \  ^__^
      \ (oo)\_______
        (__)\       )\/\
            ||----w |
            ||     ||
    

    Why can't the last line be "NKE PCRQJT XASWQ"? That is 16 characters so it should fit without wrapping.

  • I meant that you can't transfer one word in parts, for example:

     ________________
    /This is a hyphen\
    \ation           /
     ----------------
    
  • The description says:

    "Not a single character should be lost."

    Most likely, your line looked like this:
    "ITHKB\n OPAPIU"

    After \n, the entire subsequent text was moved to a line lower than that, which is why a space appeared at the beginning.

  • In the random tests, what is the rule for when a space should be at the beginning of the line?

    For example, I saw this from the reference solution:

    |GYIQLS LWYNBL   |
    |DNNNTG USEMYF   |
    |ITHKB           |
    | OPAPIU XHFOMM  |
    |KCGRNN XIBFLC   |
    |OERSVK XOXOCQ   |
    |DELXBI GVYJDE   |
    

    Why is there a space before "OPAPIU"?

  • Sorry, I don't get the "You cannot split words and move them to the next line."

    I understand you cannot split words, but in case a word spans AFTER the 16 car limit, shouldn't I MOVE it to the next line ???

  • Yeap, magic defined.
    Something like that

    #include <type_traits>
    #include <cstdio>
    
    int main (int agrc,char ** argv)
    {
        printf ("%d" , std::is_default_constructible<int>::value);
        return 0;
    }
    
  • IMHO no need to be so verbose about 'char' or 'string' or blabla in the description, and... nothing about an illegal entry command (not '0', not '1') in the DFA...

  • I added the number of tests, but I think it's better NOT to give any hint about the grid size.
    Note that in any case, the 'empty' slots are less than 60 (12 pentominos 5 slots each) :-)

  • Ok, nice suggestion. Correction done.

  • I tried to explain in the description: you are supposed to make a solver that can solve any puzzle (even with several solutions).
    The test cases yield to one solution, not the solver.

    Your solver shall generate all solutions for the empty 5x12 puzzle:

    '************\n' '************\n' '************\n' '************\n' '************'

    But there is a 99% chance that it may take (much) more than 12s!! Let me know if you have some suggestion for that... Do you think it would be nice to provide with tests cases for 2 or 3 solutions ??
  • This comment is hidden because it contains spoiler information about the solution

  • Why should we return a list if each puzzle has a unique solution?

  • You may expect performance issues...

    If this is a performance kata, could you state in the description the boundaries of grid sizes and number of tests?

  • Loading more items...