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

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

Hi, I'm wondering if the problem statements on Yukicoder are ever translated into English. I'd like to upsolve some of the problems from there, or maybe participate in live contest if they have translations. I could not find any with a brief search. If not, that's okay! Thanks :)

Полный текст и комментарии »

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

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

I think most of us would agree that seeing the tags before solving a problem often spoils it.

By default, CodeForces shows all tags and difficulty ratings next to every problem before you even click into it. Also, on the statement page itself, the tags and difficulty are shown on the side.

This makes it so that when I link a problem to my friends who happen to not be signed in, or maybe even don't have a CF account (I just want to show them the problem statement because I think it is interesting), then they see the tags right away.

Even if you are signed in, by default the tags still show. You need to go into your account settings to toggle them off. Many new users may not be aware of this feature.

I think the ideal functionality would be to hide the tags and rating by default, then have one spoiler button which reveals the tags and one spoiler button which reveals the difficulty, regardless of whether or not you are signed in.

There are a number of browser extensions which improve this experience a lot, but again, the problem is primarily not for dedicated CF users who would have these extensions. I think if this default behavior was changed, many users would appreciate the quality of life upgrade and it would be a lot easier to send problems around to my friends.

That being said, I have no idea how difficult this is to implement. If it's not feasible for any reason, that's understandable. Thanks for hearing this request out anyway :)

Полный текст и комментарии »

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

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

I am working on a problem which I believe I have reduced to the following. I know that there's a better solution to this problem but I wanted to see if there's any interesting solution to find in this direction.

I have the following matrix

A = 
[
 1  1  1  1  1 ... 
 1  2  3  4  5 ...
 1  3  6 10 15 ...
 1  4 10 20 35 ...
 1  5 15 35 70 ...
 ...
]

Notice that A[i][j] = A[i-1][j] + A[i][j-1] and that the diagonals form binomial coefficient patterns.

I want to evaluate the following function in better than O(n) time.

f(i,n,x) = (A[i][0] * x + A[i][1] * x^2 + A[i][2] * x^3 + ... + A[i][n] * x^n) % bigPrime

If it helps, there are a fixed, very small, number of values of x for which I will ever need to evaluate this at.

For example, say x is only ever in {1, 2, 3}.

Is this possible?

Полный текст и комментарии »

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

Автор hliu1alt, история, 3 года назад, По-английски

I've been trying to use the ACL lazy segtree (source code here) to solve the following CSES problem.

Is it possible through purely the template API? Or do I need to modify the internal implementation a bit. If it is possible, can anyone provide some hints on what values I need to be storing in S and what I need to pass around in F?

Thanks in advance!

Полный текст и комментарии »

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