Hi, This is my first blog. I encountered a problem PAROVI few days ago, but I am not able to solve it. Any ideas on how to proceed? Thankyou.

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

1 | tourist | 3707 |

2 | Benq | 3672 |

3 | Radewoosh | 3655 |

4 | ksun48 | 3547 |

5 | jiangly | 3492 |

6 | Miracle03 | 3480 |

7 | ecnerwala | 3400 |

8 | maroonrk | 3385 |

9 | peehs_moorhsum | 3384 |

10 | sunset | 3338 |

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

1 | 1-gon | 216 |

2 | Um_nik | 190 |

3 | YouKn0wWho | 189 |

4 | sus | 183 |

5 | awoo | 182 |

6 | Errichto | 179 |

7 | tourist | 177 |

8 | -is-this-fft- | 172 |

9 | Radewoosh | 170 |

10 | maroonrk | 169 |

Hi, This is my first blog. I encountered a problem PAROVI few days ago, but I am not able to solve it. Any ideas on how to proceed? Thankyou.

↑

↓

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Sep/25/2021 19:43:01 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

Define by $$$f(l, r)$$$ the number of sets of pairs of relatively prime integers of $$$l, l + 1, \ldots, r$$$, and by $$$g(l, r)$$$ the number of sets of pairs of relatively prime integers of $$$l, l + 1, \ldots, r$$$ such that there is no $$$x$$$ among $$$l + 1, \ldots, r$$$ satisfying Slavko's constraint. Then we have the equality

Thanks. One small question, what should be g(i,i) equal to? Do we have to consider here that we can't construct a pair using same number and also empty sets are not allowed? In that case g(i,i) should be zero. But my code works only with g(i,i)=1. My AC submission

124755941 could you please explain me this question ...