A very interesting problem.

Правка en5, от Geanina_the_Great, 2023-03-27 23:39:34

Hello, codeforces!

As you can observe from my rank, I am quite a codeforces newbie. I spend all my days on the sacred romanian OJ, Infoarena( https://www.infoarena.ro/ ), and, more recently, Kilonova( https://kilonova.ro/ ). Altough the blue color is dominating my profile and I should not be taken seriously for such heresy, I want to share with the good people of codeforces an interesting problem. Please do not bully me, despite my little experience. I would be honored to hear your opinion.

This is the 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

I know how to solve this problem, but my solution is, as we call it in Romania, a very big "tractor" (translation for truck). I am very curious for what you come up with.

Best wishes, Geanina.

Теги fft, dynamic connectivity, link cut tree, computational geometry

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский Geanina_the_Great 2023-03-27 23:39:34 13
en4 Английский Geanina_the_Great 2023-03-27 23:24:04 34
en3 Английский Geanina_the_Great 2023-03-27 23:22:48 69
en2 Английский Geanina_the_Great 2023-03-27 23:22:23 69 who is small and likes milk?
en1 Английский Geanina_the_Great 2023-03-27 23:21:20 1177 My hones reaction when I first encountered the problem. (published)