farmersrice's blog

By farmersrice, history, 4 months ago, In English,

http://codeforces.com/contest/963/submission/37451734

Not sure where my code has a bug, but I submitted 3 times and it's always the same error on test 48.

I could not decipher this part of the message:

Diagnostics detected issues [cpp.clang++-diagnose]: =================================================================
==6068==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x14e00978 at pc 0x00dc63fd bp 0x1355f754 sp 0x1355f750
READ of size 4 at 0x14e00978 thread T0

I would appreciate any help. Thanks!

 
 
 
 
  • Vote: I like it  
  • +5
  • Vote: I do not like it  

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hmm, I fixed some possible string out of bounds issues but it's still failing

http://codeforces.com/contest/963/submission/37452849

»
4 months ago, # |
  Vote: I like it +16 Vote: I do not like it

Is your address 6969 or something that you need Address Sanitizer

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Subtracting k from possible.size() can do bad things, since possible.size() is an unsigned int.

»
4 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

37476557

Here is the Problem