ASCII art puzzle discussion

Solved by 98846 coders.
So I can say that there’s no issue on this official CG puzzle
even if N has a particular representation compared to others.

1 Like

I have an issue with test case 5 as well.
The Console output shows me the same first row as my solution. So for me it looks like that I did it in the correct way. But in the failure message has a different last character than the console output.

Console Output: ".----------------- "
My Output: ".----------------- "
Expected Output: “.-----------------.”

This is confusing for me.

If you check the inputs, you can see that there is one dot before the "-"s and one dot after the "-"s for the transformed version of each character, e.g.
Screenshot 2021-10-09 at 2.24.25 PM

1 Like

what is the ROW? Why he is there?

Each ROW (row) according to the puzzle statement is

the string of characters ABCDEFGHIJKLMNOPQRSTUVWXYZ? represented in ASCII art.

Hi,
How do you draw letters with parameters L<>4 or H<>5 ?
For exemple L=1 and H=29…

Please, could you update the game description in order to deal with that.
For exemple, delete those two useless parameters or describe how to draw letters in other dimensions (different than 4x5).

You’ll need to use the L and H parameters in order to read in the ASCII art alphabet that is provided at the end of input. With width and height information, you can parse the art alphabet into a 2d array of strings and use that to print the art letters line by line.

See test case 5, the width and height of each ASCII character are not always 4x5.

1 Like

Because L and H are variable parameters, and some of the constraints are 0 < L < 30 and 0 < H < 30, it means LxH can be 1x29 or 21x2 or 23x3, right ?
So how you people draw letters with dimensions that are not described in the game. There, you can only find the description of letters for 4x5 and 20x11 (that you can only find while opening test 5) ?

Thank you, I haden’t seen this one.
Anyway, my questions/comments still stand…

All possible cases are within the constraint so that nothing is “not described”.
You have to handle unseen test cases that may be different from the open test cases. As long as the unseen test cases are within constraint, they are “described”.

So you need the parameters L and H. Do not hard code the size to 4 or 5.
In your code, calculation should be based on the variables L and H, to allow your code producing different outputs when L and H change.

1 Like

Well, how do you draw an “A” or a “B” in ASCII art with L=1 and H=29 ?

29 is too large and inconvenient to use as example.

Suppose L is 1 and H is 3 in the input.
The ASCII diagram input, of the first few letters, can be:

***
ABC
***

If requested to output A, it is:

*
A
*

If requested to output CA, it is:

**
CA
**
2 Likes

Y’a vraiment pas suffisamment d’indices… J’ai jamais fais de ASCII avant et je vois que les indices sont quasiment vide d’information.

Décourageant…

Suggest you to focus on what the task needs, e.g. knowing how substrings are handled, instead of focusing on the term “ASCII art” itself.

My program tested all cases with success but the results shows different cases of input such as ABC…
is there a bug in this problem?

Test cases and validators are different most of the time. Your code has to be general enough to adapt to validators too.

J’ai réussis à obtenir le E en ASCII en imprimant successivement les index nécessaire dans ROW mais j’ai toujours une erreur en sortie, je pense que c’est parce que je n’ai pas convertis les “espaces” vide en “?”, seulement ca donnerait quelque chose d’extrêmement farfelu si je convertissais les espaces entre les barres en E en point d’interrogation.

Comment faire ?

please ask your questions in English.

Why don’t you try converting spaces into question marks and see if it passes the tests regardless of whether it seems eccentric or not?

Because it seems to be a massive pain to do it first thing, and since i already did struggle quite a lot managing to print a letter in ASCII, i didn’t wanted to bother with that now, keeping the harder stuff for later.

Plus printing every space as “?” in ASCII art would look terrible on the final result ( it would probably give a E where every space in between the three horizontal bar would be filled with massive “?” in ASCII ), the puzzle does a pretty meh job at explaining things imo, especially that part, we are supposed to print a “E” in ASCII, but the exercice ask for conversion of space with enormous ASCII character that would break that “E”