Home  >  Q&A  >  body text

debug - c++ 这个算法哪里有问题? 关于流感传染

大家讲道理大家讲道理2714 days ago559

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:22:35

    After a cursory glance, j and k both start from 0, so [j-1][k] and [j][k-1] will fail

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:22:35

    Try using a queue, breadth-first traversal, there are obviously some problems with using a for loop, for example, if you take m=1, you don’t look at the code carefully...

    reply
    0
  • Cancelreply