/ Test /

Record Case Detail

Notes

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

Stderr

ASAN:DEADLYSIGNAL
=================================================================
==2275==ERROR: AddressSanitizer: SEGV on unknown address 0x602ffffffb60 (pc 0x5654fc40aa12 bp 0x7ffdf1e707f4 sp 0x7ffdf1e70470 T0)
==2275==The signal is caused by a READ memory access.
    #0 0x5654fc40aa11 in LRUCache::read(int) (/out/package/cache_mem+0x4a11)
    #1 0x5654fc408ae5 in main (/out/package/cache_mem+0x2ae5)
    #2 0x7f9682700b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #3 0x5654fc40a3e9 in _start (/out/package/cache_mem+0x43e9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/out/package/cache_mem+0x4a11) in LRUCache::read(int)
==2275==ABORTING

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

ERROR: Address out of bound

JOJ Answer

ERROR: Address out of bound
ERROR: Address out of bound
0
0
7 0
0 0
0 0 0 0 0 0 0 0 
ERROR: Address out of bound
ERROR: Address out of bound
ERROR: Address out of bound
ERROR: Address out of bound
6 600
1 100
0 0 0 0 0 0 0 0 
ERROR: Address out of bound
ERROR: Address out of bound
5 500
7 700
0 100 0 0 0 0 600 0 
500
ERROR: Address out of bound
3 300
5 500
0 100 0 0 400 0 600 700