https://www.codingame.com/training/medium/bingo
Send your feedback or ask for help here!
Hi everyone.
My code for Bingo! puzzle successfully passes all testcases, except the simplest one (1 Player). I double checked it manually and it seems that the testcase result for the first line is wrong - it should be 56, not 54.
Could you please check?
You probably aren’t handling the middle square properly.
I think I am.
There is an easy was to check this - the expected “answer” is 54. 54th number is 1, which is in the top left corner of the card (so middle square does not matter).
Also, numbers 89 and 69 from the first row are drawn after the number 1. Same goes for numbers 72, 37 and 25 from the first column. Therefore, number 1 (drawn as 54th) cannot be the solution.
Puzzle link: bingo!.
A line on the bingo card is defined as any row, column or diagonal of 5 numbers on the card.
When I ignore the diagonal, I get 56. With them it’s 54. And of course there must be a bug in the problem that has 250 solvers already.
Bingo!
Thank you! I totally overlooked the word “diagonal”. The bingo outside US is totally different - I will contribute the non-US bingo puzzle today
I saw that a lot of users solved the problem, but also with the fact that only one of 131 cases failed. Shouldn’t there be more diagonal cases, statistically?
I think there is still something wrong with this puzzle. In fact when i print the ticket’s numbers, this is what i get:
1 67 89 69 48
2 65 38 85 28
7 29 0 54 22
3 80 10 75 58
5 35 49 87 27
But normaly we should have :
1 67 89 69 48
72 65 38 85 28
37 29 0 54 22
83 80 10 75 58
25 35 49 87 27
It’s the same thing for the called numbers. Why is the first caractere is missing in the print and then in the rest of the program ?
You can view the test case inputs in the IDE - the numbers aren’t missing. If they are missing when you print then there is something wrong in your code (either when reading or printing).
yes, but can’t figure out what, i just take the inputs and print them as simple as it can be, with C
Did it. For people with the same problem, i took the “fgetc(stdin);” away in the first loop (the row one)
Can you check the 5 players test case. Exactly the (Line 2 : The amount of numbers that need to be called before a bingo card has a full house (all numbers filled).)
I checked, and don’t get 83, it always went to 88
Hi Codingame community,
Need some help,
I have filled all the 4 test but in submission 1rst and 3rd didn’t worked.
Could someone check my code in mp to give me some hint why ?
Thank you a lot !
I got my 4th validator on submission that is not corect but all test in IDE was good. Can you please add more test to encapsulate this case too ? Lots of frustration when you pass all tests, then at submission you don’t get 100%.
The input is not being correctly read, right now we only read n, n lines, and then one more line whereas we should actually read n, n * (5 lines == one bingo card), and then the last line.
The stub generator should therefore be changed from
loop n read row:string(1024)
To
loop n loop 5 read row:string(1024)
Thanks for reporting. I’ve fixed the stub generator as well as a few other things.