Блог пользователя arthur_9548

Автор arthur_9548, 5 месяцев назад, По-английски

We hope everyone enjoyed the problems of XIII UnB Contest Mirror! This editorial contains the description of the solutions and their implementation. Feel free to discuss them in the comments!

Problem A

Solution
Code

Problem B

Solution
Code

Problem C

Solution
Code

Problem D

Solution
Code

Problem E

Solution
Code

Problem F

Solution
Code

Problem G

Solution
Code

Problem H

Solution
Code

Problem I

Solution
Code

Problem J

Solution
Code

Problem K

Solution
Code

Problem L

Solution
Code

Problem M

Solution
Code

Problem N

Solution
Code
Разбор задач XIII UnB Contest Mirror
  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Fast and nice editorial, thanks!!

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

The problems C and L are my favorites!

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится +12 Проголосовать: не нравится

Awesome! Thanks for the contest.

»
5 месяцев назад, скрыть # |
 
Проголосовать: нравится +15 Проголосовать: не нравится

Also, using python in problem L, I calculated the full answer with the formula, printed it modulo 10^9 + 7 and passed.

  • »
    »
    5 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +8 Проголосовать: не нравится

    nice, samu! however, this code in c++ is also very simple. to calculate a/b in modular arithmetic, we can do a*(b^(mod-2)), with mod being a prime (like 1e9+7). this means multiplying a by the multiplicative inverse of b, which is possible 'cause of fermat's little theorem. for the other operations (+, — and *), you can just apply the mod directly.