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

Reminder: in case of any technical issues, you can use lightweight websites
m1.codeforces.com,
m2.codeforces.com or
m3.codeforces.com
×

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

1 | tourist | 3698 |

2 | Um_nik | 3463 |

3 | Petr | 3341 |

4 | wxhtxdy | 3329 |

5 | LHiC | 3300 |

6 | ecnerwala | 3285 |

7 | sunset | 3278 |

8 | V--o_o--V | 3275 |

9 | Benq | 3262 |

10 | mnbvmar | 3248 |

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

1 | Radewoosh | 187 |

2 | Errichto | 180 |

3 | rng_58 | 161 |

4 | PikMike | 160 |

5 | Vovuh | 157 |

5 | Petr | 157 |

7 | 300iq | 151 |

8 | Ashishgup | 149 |

9 | majk | 148 |

10 | Swistakk | 147 |

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

↑

↓

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/26/2019 17:48:16 (e3).

Desktop version, switch to mobile version.

Supported by

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 :)