Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

determinism's blog

By determinism, 9 years ago, In English

I implemented the solution of Jzzhu and Cities as it's told in the tutorial, but I've got WA on test 5. What's my mistake?

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

»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it

You should subtract degree[v] only if d[v] equals w.

if(d[v] == w)
    degree[v]--;