Back to General discussions forum
I was given this as test data:
15
22344
22231
44142
32243
34313
16
0 3, 0 1, 4 0, 0 0, 3 1, 3 1, 2 1, 0 1, 1 2, 0 0, 0 0, 2 0, 1 1, 1 0, 0 1, 0 0
The "15" implies that I should get a 15x15 grid, right?
Yes, and sometimes I find that some moves are in the empty zone.
OMG, again the same idiotic mistake of mine - saving checker with additional code lines used to create example in the problem statement. We call this to step on the same rake :(
Please, forgive me my stupidity! Hope now it is fixed.
I saw moves in the empty zone because I didn’t read the fucking consigne.
My code works for the example but not for the test cases.
I think there might still be a problem with the scoring.
I added an output function and put a full game here: Color Cubes
As far as I can see, my running of the game is correct and so is my scoring, but the site always has a higher score...
Is it my turn to step on a rake?
P.S. If it's any help, this is how I score groups of cubes:
1: 1
2: 3
3: 6
4: 10
5: 15
6: 21
7: 28
8: 36
9: 45
10: 55
11: 66
12: 78
13: 91
14: 105
15: 120
16: 136
17: 153
18: 171
19: 190
20: 210
21: 231
22: 253
23: 276
24: 300
25: 325
I have the same problem and the same list of scores (the triangular numbers might not be the problem).
I feel miserable...
I'll try to check it now. There were two more small bugs which I fixed but it looks there are even more :(
It’s still over what I found.
I've found the bug - I'm sorry to say, but I failed to count removed cubes properly. I'll try to fix it now...
UPD3 Ah, I've fixed it, then have found the bug in my fix and now this is fixed again.
Yes, it’s correct. Oh, the nice star.
I've found a bug for test data (after your yesterday post about fixes):
for test data
16
3333213214131331
4142323134133412
2113213112331212
4342112441143331
1313432142142114
1213244421444332
3131121321121424
4324112423131231
1441121111124422
3133443331311121
4334311221431132
1313424432443221
2124142221344332
1144122232122431
1124222421234411
4422423131431414
77
7 0, 12 12, 9 4, 3 2, 11 15, 3 5, 2 4, 15 2, 5 2, 6 4, 7 5, 11 8, 4 2, 7 2, 7 9, 5 11, 15 2, 11 6, 6 10, 11 1, 13 11, 9 0, 3 6, 2 6, 11 5, 13 2, 1 7, 13 2, 12 2, 9 1, 4 12, 2 2, 2 5, 13 3, 12 4, 11 1, 6 2, 10 7, 13 5, 1 5, 6 6, 11 0, 8 5, 12 1, 13 2, 8 1, 5 6, 7 3, 8 0, 0 3, 10 0, 10 2, 0 6, 9 0, 4 11, 4 9, 9 1, 3 4, 8 0, 7 2, 4 3, 7 1, 1 0, 3 4, 5 3, 0 1, 2 3, 6 0, 4 3, 2 0, 4 3, 6 0, 0 0, 1 0, 1 0, 1 0, 0 0
The checker accepts answer 42027
It seems that the checker removes only one empty column when he met a pair of them. I've checked this broken algorythm and I found that on step '10 2' it takes the empty value.
> It seems that the checker removes only one empty column when he met a pair of them
I'm afraid that your suspicion is probably correct, Sorry. I'll try to take care of this problem too.
It seems the exercises was complicated enough for me also :(
UPD I've plugged these data into existing algorithm and it produces result of 1017
. Looks like I currently
could not reproduce the problem. I'll try to explore it deeper later, now I even could not generate input data with expected answer so much above 1000
(i.e. something like 42000
).