abdi
Hi I seriously need help creating Ascll art but I need most
help debugging and solving it , please help .
abdi
Hi I seriously need help creating Ascll art but I need most
help debugging and solving it , please help .
Iâm at a loss for what Iâm missing - hereâs the console output from the first test case:
L: 4
H: 5
T: E
###
#
##
#
###
Fail
Found: "### "
Expected: "### "
Maybe a \n missing?
How would I validate that? Iâm using C# and (despite it probably being overly complicated) Iâm building an 2-D array of output characters, then spitting out each row with Console.WriteLine(new string(output[rowIdx]));
.
Dear fellow coders,
Iâm quite new to Python, please explain me why is it not working as I think it should work.
For this pretty simple exception handling use case (sorry for the indentation, dunno how should i format it here):
try:
indexes.append(letters.index(t[i].upper()))
except ValueError:
indexes.append(letter.index(â?â))
Now, when Iâm trying to get a character from the list, which is not present in the letters list, like â@â, then the console is rather complain about the unexpected exception instead of just jumping to the except part of the code.
Is it normal? How should I handle these cases otherwise?
Thanks.
Why not using a set or a hashtable (dict)?
Bonjour,
je ne comprend pas le problĂšme :
Voici ce que jâobtiens pour M@NH@TT@N
Fail
Found: "# # "
Expected: â# # #â
Je ne comprend absolument pas pourquoi lâexpected me montre une chaĂźne de 5 caractĂšres de long, alors que dans le fichier de donnĂ©es, la premiĂšre ligne contient 4, qui est âla largeur L dâune lettre representĂ©e en art ASCII. Toutes les lettres font la mĂȘme largeur.â
Dans lâexpected, je vois la premiĂšre ligne du M puis le premier caractĂšre du â?â.
Câest confirmĂ© par :
Fail
Found: "# # "
Expected: "# # " (votre moulinette dâaffichage (mais pas celle de lâĂ©dition) des messages sur le forum effectue une suppression des espaces quâelle juge inutiles, mais la console mâaffiche bien deux espaces avant le deuxiĂšme ")
pour le cas MANHATTAN,
et par :
Fail
Found: " .----------------. "
Expected: " .----------------. " (votre moulinette dâaffichage (mais pas celle de lâĂ©dition) des messages sur le forum effectue une suppression des espaces quâelle juge inutiles, mais la console mâaffiche bien deux espaces avant le deuxiĂšme ")
pour le cas avec une autre représentation ASCII.
A chaque fois, lâexpected me montre L caractĂšres + 1, au lieu de L caractĂšres.
Il nây a que le cas E qui passe.
Merci.
Hello coders! In the last test with a different ASCII fonts it seems to be a trouble with Letter âNâ How to ask a developers of TEST CASE to sort it out?
Beware if your code is in Javascript because : str.search(â.â) returns 0 and not -1 as expected if str is not empty !!! I donât understand whyâŠ
Thatâs why this test canât pass for me. I replaced str.search() by str.IndexOf() and all is ok !
str.search
converts its argument to a regular expression and uses that to search, and in a regular expression the point stands for âany symbolâ.
OMG ! Iâm so stupid ! Thank you for explaining me my mistake !
I Found the same problem as you! The first line for the letter âNâ as one â-â more than all the others, and doesnât end with a blank space, like the other letters do!
Iâm confused by this puzzle. From the replies above it seems we have to find the input characters in an index of the ASCII Art and then display. But, where is the ASCII art stored?? Are we expected to create it ourselves?? This is very unclear to me. Could really use some help hereâŠ
The ASCII art table is given in the input.
Got it, thanks! The answer was right in front of me, just couldnât see itâŠ
Thanks Aeleck, that was the clue I needed to make my code 100%. I had added a space to my python dict, but that was indeed not necessary. Cracked my head on it over and over and then decided to check the forum. So your hint saved me a lot of time, thanks!
Bonjour,
Je pense que je nâai pas bien saisi les donnĂ©es dâentrĂ©es: dâaprĂšs ce que jâai compris, il y a la largeur de chaque mettre (L), leur hauteur (H), le tableau des caractĂšres Ă âencoderâ en art ASCII, puis (et câest lĂ que jâai un doute), le tableau des lettres de lâalphabet en art ASCII.
Ce dernier est défini ainsi:
   for (int i = 0; i < H; i++) {
       char ROW[1025];
       fgets(ROW,1024,stdin);
   }
Dâune part, je trouve cette dĂ©finition horrible (Ă chaque Ă©tape de la boucle for, le tableau ROW est redĂ©fini?) et dâautre part, lorsque jâessaye dâutiliser ce tableau dans mon code, on me rĂ©pond âROW undeclaredâ.
Je pense que je nâai pas bien saisi comment Ă©tait ce tableau exactement.Si quelquâun pouvait mâĂ©clairer sur le sujetâŠ
LâĂ©noncĂ© comporte des exemples qui montres certaines donnĂ©es en entrĂ©e.
Row reprĂ©sente la chaĂźne de caractĂšres de tout lâalphabet, ligne par ligne.
A BBBBB
A A B B
AAAAA B B
A A BBBBBB
Pour i => H
Row va valoir :
0 : â__A__BBBBBâ,
1 : âA_A_B___Bâ
Et ainsi de suite.
Dâautres part chaque template (code par dĂ©faut), ne sont pas gĂ©nĂ©rĂ© Ă la main mais automatiquement pour les 23 langages, ce qui peut amener Ă voir des abominations
The scope of the variable ROW is limited to the for loop. You need to store the values in an array (strcpy could be useful).
As SaiksyApo said, the code is automatically generated and thatâs clearly not perfect. But that avoid us to provide approximately 1400 codes for the games and more than 3000 for the clashes.
aaaah, ok! Je ne voyais pas du tout comment Ă©tait row en fait, maintenant câest plus clair!
Je ne vois pas encore comment je vais faire avec ça, mais au moins je comprends à quoi ça ressemble^^
je vais y réfléchir, merci!