Comments

First, we can split k into power of 2s. Implementing division by 2 is not so hard so I will leave it to you.

Then we can notice that its not hard to create a graph that contains exactly 2^k path from 1 to n.

For example: Graph with 2 paths.

Graph with 4 paths

Then we can combine these graph together to form k.

Graph with 6 paths.

I don't have a exact maximum number of nodes / edges that this requires but it should be well under the limit

On YandexYandex Cup 2024!, 22 months ago
0

Has the finalists of each track been announced?

On SammmmmmmCounting problem, 2 years ago
0

Can someone help?

"change an interval to be equal to some given x" and "calculate the number of positions with a value greater than or equal to y" (sets and fenwick)". Can you briefly explain how to do this? Thanks.

Can someone help?

Thanks! I got it :))

Auto comment: topic has been updated by Sammmmmmm (previous revision, new revision, compare).

No, it's not. Somebody already sent the link.

Tysm. That's such a cool solution!

Auto comment: topic has been updated by Sammmmmmm (previous revision, new revision, compare).

Auto comment: topic has been updated by Sammmmmmm (previous revision, new revision, compare).

On SammmmmmmSNOI Feast, 3 years ago
0

Auto comment: topic has been updated by Sammmmmmm (previous revision, new revision, compare).

Hi, may I ask for the solution for DAY 2 C: Sopsug. Thanks