I can't understand from editorial or any of the comments.Thanks in advance.

# | User | Rating |
---|---|---|

1 | tourist | 3434 |

2 | fateice | 3337 |

3 | Um_nik | 3292 |

4 | OO0OOO00O0OOO0O0…O | 3280 |

5 | Syloviaely | 3274 |

6 | Petr | 3223 |

7 | Swistakk | 3105 |

8 | mnbvmar | 3096 |

9 | yosupo | 3091 |

10 | dotorya | 3081 |

# | User | Contrib. |
---|---|---|

1 | rng_58 | 164 |

2 | tourist | 163 |

3 | csacademy | 152 |

4 | Petr | 150 |

5 | Swistakk | 149 |

6 | Um_nik | 144 |

7 | Nickolas | 142 |

8 | Vovuh | 141 |

9 | BledDest | 138 |

9 | matthew99 | 138 |

9 | PikMike | 138 |

9 | Errichto | 138 |

I can't understand from editorial or any of the comments.Thanks in advance.

↑

↓

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jul/17/2018 12:21:35 (d3).

Desktop version, switch to mobile version.

User lists

Name |
---|

there is a laser going with sqrt(2)blocks/second. So it goes (0,0) to (1,1) in first second, (1,1) to (2,2) in second second ... If the laser meets the wall its reflects like a mirror reflects light. And there are some sensors in some points. You need to calculate whether it will pass through the sensor for each sensor and if it passes, you need to calculate when.

Yeah , I get that and I also understand that we would use extended gcd to find solution to our diophantine equation but I can't follow ahead. As to how we are using those coefficients to calculate time?

Well, I havent solved the problem but I am working on it right now.

Cool tell me once you are done :)