Comments
On KANCodeforces Blitz Cup 2026, 6 months ago
0

Can we submit the problems (gym)?

0

Why I cannot register for online mirror?

0

Where can we submit the solutions to the problem. Are problems added to any online judge?

+3

Upvoted!

Thank you for the explanation.Understood!

0

Why last second element os goven so much importance?

0

How to solve B?

+29

Peking University takes the cup — ICPC 2024 WC! Congratulations.

Great explanation jay_1410!
Thank you so much! Appreciated!

For problem F,
Can anyone help me to understand how $$$\lfloor{\frac{t - 1}{c}}\rfloor$$$ is derived?

Also, please let me know if it is a standard or generic way to calculate in such situations.
Thank you in advance.

Got it 1xx55!
Thank you for the help! Appreciated.

For problem E,
Can any one explain for $$$h \lt 10^9$$$, why the given time complexity holds true? Why in $$$log$$$ there is $$$h * max c_i$$$?
Thanks.

On cryCodeforces Round 952 (Div. 4), 2 years ago
0

Ohh!

Got it. Thank you for sharing the insights. Appreciated.

On cryCodeforces Round 952 (Div. 4), 2 years ago
0

How to solve C?

Hi!

I am not able to understand editorial for Problem: Everythin Nim. Can anyone explain me in simpler terms?

Thanks in advance.

Clean solution! Thank you for sharing!
Upvoted!

Yeah, thank you for the answer!
Upvoted!

I got TLE! Created 5 arrays according to string sizes.
Accordingly, there will be 4 pairs that produce even sums ((1, 3), (1, 5), (2, 4), (3, 5)).
Also, count among themselves meaning among array of length 1, 2, 3, 4, and 5.
Got TLE for this!

Any leads how to solve it?

Thanks for sharing!

Curious to know is this technique document anywhere else?

On drugkeeperI'm blue!, 3 years ago
0

Great work! You nailed it!

I did that, chatgpt didt went well! GPT is language model, it doesnt understand the logic encoded in some kinda variables!

Thank you for sharing, I am aware of this blog and solution it contains is recursive. I am looking out for iterative intuition.

I see some kind of pattern author is trying to code, is it?

Recently, I found this solution online, anyone can decode it?

It would be great if you share any of the insights for iterative solution.

Yeah, you can refer the link I have added to get rid of confusion.

Can you elaborate a bit more on this? I tried thinking in this way but not able to pick up!

I find recursive solution difficult to understand.

I am not able to open the editorial page. Why so?

On Kevin114514I'm Kevin114514, AMA!, 3 years ago
0

It would be great if you could share resources you personally refer for studying.

Think of it in the following way:
1. from first string take substring from index [1, n — 1], here n is length of first string (because operation is valid for tower for length >= 2).
2. from second string take substring from index[1, m — 1], here m is length of second string.
3. reverse the string second (the substring of it) because the poping of block works like a stack.
4. concatenate strings from step 3 and step 1.
5. traverse through the concatenated string and count the number of colors that are same consecutively.
6. if count > 1 then answer will be "No" otherwise it should be "YES".

Okay

Thank you so much for the blog. Much appreciated.
It will be great if you could attach the problem set from codeforces related to combinatorics (basic) level.

Is there any way, so that I can include the system timestamp when I call the sublime snippet using tabtrigger?
Eg. $CURRENT_TIMESTAMP kind of variable.

Thanks in advance.

-10

Can you please explain it in detail regarding how to calculate a^(b^(c^(d))) (mod p). Actually I didn't get why we have to calculate totient function? That would really help me a lot sir.

Hope this helps. Josephus Queries seems to be modified version of standard Josephus Problem.

Great work!

Source of the problem statement? Was it asked in interview?

Thanks in advance :)

Did you got the proof? It would be a great help, if one can help me to understand this!

Thanks in advance.

On Guwanch1Geometry problem, 4 years ago
0

Problem is good. Source of problem or where can we submit solution to this?

SPyofgame I think time complexity will be O ((N^2) * (N!)) as for each path there will be N^2 computation right? Correct me if I am wrong. Thanks in advance.

On Yukuk[Tutorial] 1-K BFS, 5 years ago
+1

Thank you for such a great blog. I have two doubts.
Doubt-1:
Can anyone explain why time complexity N*K + M and not N*(K + M)? As the last for loop is in while loop hence I think it should be N*(K + M) not N*K + M.
Doubt-2:
Also, I think time complexity should be something like N*K + H, where H denotes total relaxations.
Please correct if I am wrong.

0

Thank you for sharing the submission. But, I didn't get what you did! It would be great if you could explain what was the approach and how that differs from my solution.

0

For problem C, can't we use DSU? I used DSU and got TLE!!! Can anyone explain why DSU is giving TLE?

Thanks in advance!

0

According to me, continuing CP is a good choice (let be anywhere if not Codeforces platform) because doing CP keeps you UP all the time. Your brain does not get lazy. Moreover, directly or indirectly the thinking process/strategy we use here is used in real life and that help us to tackle the problem easily.

Just like to execute you have given command, can you please provide full command to debug.

-8

In my pc(Windows 10, i5-7th gen, 8GB RAM) -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector is not working . It shows :

c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot find lasan                                       
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: 
cannot find -lubsan                                      
collect2.exe: error: ld returned 1 exit status                                                                

Please help me how should I solve this problem. I use FAR MANAGER.

-10

.