Ad
  • Custom User Avatar

    You can technically do what you're trying to do without division; your intention is to cancel out numbers, and you can either do that by division as you're doing, or by multiplication (hint: maybe std::lcm can help?). Haven't tried it out, but you should probably be able to find an approach that works without float division.

  • Custom User Avatar

    Very fun task, solved using queue

  • Custom User Avatar

    When using a faster approach that requires working with floating point numbers, the results on large matrices are either off by 1, or miss completely. How can I fix that?