notsoawesome's blog

By notsoawesome, history, 5 years ago, In English

Hello everyone, I am quite new to code-forces and I noted that there are some issues with the code-forces compiler but it turned out to be my mistake, but here in this particular question I cannot find any mistake. Question Link: Here--->http://mirror.codeforces.com/problemset/problem/393/B And my solution(ya, don't judge why am I solving such dumb questions...) My Solution: Here--->http://mirror.codeforces.com/contest/393/submission/56501161

->I also tried taking input as double but still, it gave output as all zeros( it's rather unnecessary as it's mentioned that all inputs are integers) ->It works perfectly fine in online gdb ... etc. ->Please look up to it, as something like this also happened to me during contests too.

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

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey, I found your mistake! You just have to initialize all your matrices with a value, like 0. Here is the Accepted code: https://mirror.codeforces.com/contest/393/submission/56502281

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    By the way, please, dont say that the problems you are trying to solve are "dumb problems" because no problem is dumb! Happy coding! ( dont be shy having issues with A's and B's, for example)