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

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

Hello, codeforces!

Do y'all like my profile picture? I personally think it perfectly encapsulates this platform's ideals and values and it also aligns with my beliefs. Moreover, it really does a world of good to my mental health, so there is that.

Anyways, I have this really cool problem: You are given a string S of digits separated by the following operators: +, , -, /, ^(pow), $$$(xor), &, |, (, ). Parentheses have biggest priority, then: '^'(pow) > '/' > " > '+' > '-' > '&' > '|' > '$$$'(xor). The task is to find out in how many ways modulo 10^9 + 7 you can rearrange the characters of the string such that the result is a given X(X < 10). |S| <= 2 * 10 ^ 5. Time limit: 0.01 seconds Memory limit: common sense.

Happy Christmas to all my christian fellas!

Yours truly, Geanina

  • Проголосовать: нравится
  • -32
  • Проголосовать: не нравится

»
5 месяцев назад, # |
Rev. 3   Проголосовать: нравится +30 Проголосовать: не нравится

My brother in christ, the solution is very simple: take FFT of input strin g, build segmented tree on output, then problem is equivalent to dijkstra inverse modulo 998343447.

This is trivial to do with mo's algorityhm. Final complexity: $$$O(\sqrt{log(n)⋅mi} + q^3)$$$ , where n = number of string, m = sprague-grundy number of string, i = imaginary number, q = number of times you asked this question. Hope it helps!1@!@@1!!!!

by the way, very nice profile picture, but does not have enough rizz and gyatt. 4/10

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

Umm no offense, but this helps your mental health?

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

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

yeah, as if everyone would agree that a amongus with feet bigger than its head as a profile picture that by your words, "perfectly encapsulates this platform's ideals and values"