Record Case Detail

Notes

This function is in beta test. Please help improve it in the issues here.

Stderr

/in/compile/../brain.cpp:36:35: runtime error: index 14 out of bounds for type 'int [14]'
/in/compile/../brain.cpp:38:35: runtime error: index 14 out of bounds for type 'int [14]'
/in/compile/../brain.cpp:39:30: runtime error: index 14 out of bounds for type 'int [14]'
/in/compile/../brain.cpp:53:35: runtime error: index 14 out of bounds for type 'int [14]'
/in/compile/../brain.cpp:55:35: runtime error: index 14 out of bounds for type 'int [14]'
/in/compile/../brain.cpp:56:30: runtime error: index 14 out of bounds for type 'int [14]'
=================================================================
==77305==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffd7bd573f0 at pc 0x5573400b3d51 bp 0x7ffd7bd55bf0 sp 0x7ffd7bd55be0
READ of size 4 at 0x7ffd7bd573f0 thread T0
    #0 0x5573400b3d50 in MyBrain::getDraw(Tile) (/out/package/lab7+0x32d50)
    #1 0x5573400b8c5b in Game::initHand(bool) (/out/package/lab7+0x37c5b)
    #2 0x5573400b85f8 in Game::Game(Brain*, Brain*, int) (/out/package/lab7+0x375f8)
 

Hints

Your answer may be identical to the JOJ answer in the first several lines.

However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.

Please double check your code to solve this problem and try again.

Your Answer

Target: 500

[seed]

JOJ Answer

Target: 500

[seed]
[7851]
[6112]
[11542]
[20454]
[20813]
[7168]
[27108]
[26166]

YOU WIN