Hello.

**UPD** Old links don't work. New: https://www.dropbox.com/sh/b9apawmc61mzq3p/AADvGv3iF6cHwEEJ4anth5IYa?dl=0

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

1 | tourist | 3947 |

2 | ecnerwala | 3654 |

3 | jiangly | 3627 |

4 | jqdai0815 | 3620 |

5 | orzdevinwang | 3612 |

6 | Benq | 3586 |

7 | Radewoosh | 3582 |

8 | Geothermal | 3569 |

8 | cnnfls_csy | 3569 |

10 | ksun48 | 3474 |

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

1 | awoo | 163 |

2 | maomao90 | 160 |

3 | adamant | 156 |

4 | atcoder_official | 155 |

5 | maroonrk | 152 |

6 | cry | 148 |

6 | -is-this-fft- | 148 |

6 | SecondThread | 148 |

9 | Petr | 147 |

10 | nor | 145 |

Hello.

**UPD** Old links don't work. New: https://www.dropbox.com/sh/b9apawmc61mzq3p/AADvGv3iF6cHwEEJ4anth5IYa?dl=0

↑

↓

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/09/2024 01:42:40 (k1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

Where I can submit my solutions?

IDK really. I tried to find out but couldn't find anything.

you can submit problems in exam :)HAHA

Can anyone who solved problem A explain their solution?

I was thinking of a hacky solution of creating segtree storing xor, sum, product(mod prime) of a range in node, then query to check if those properties are equal. I do not ex[pect this to be the official solution. Can anyone post the solution/hints?

Hint: For each number remember nearest left/right element with same value. It's easy to change this value during update.

If a[l,r] is a permutation: 1) Minimum is 1

2) Maximum is r-l+1

3) All elements are distinct( minimum of left values <= l)

Create a segment tree and store sum of where . To check just compare the sum of segment with . Update is easy.