### Virtual_Contestant's blog

By Virtual_Contestant, history, 2 months ago,

We know that the solution of x1 + x2 + x3 .. xk = n, where xi >= 0 is given by nCr(n + k — 1, n). I was trying to solve a problem in which I had the constraints that all the xi were bounded by ai meaning (xi >= 0 and xi <= ai for all i from 1 to k). I know how to solve this problem using hand (by findind the coefficients and all) but how do I write a code for it or is it possible to write a code for it?

• +2

By Virtual_Contestant, history, 5 months ago,

What could be the reason for runtime error? Pleas help me.

Submission

• -27

By Virtual_Contestant, history, 5 months ago,

I am not able to think about the possible reason for the runtime error on my submission for problem E. Can you please help me fix it?

This is my submission

• -27

By Virtual_Contestant, history, 7 months ago,

Hello Everyone I am struggling a lot to solve this problem: Can anyone please help me solve this problem? Problem Thanks!

• +8

By Virtual_Contestant, history, 9 months ago,

This is a simple question where we can easily solve without the segment trees by just opening mods. Can anyone tell the segment tree way to do this. I am pretty excited to know the solution using segment trees.

• -5

By Virtual_Contestant, history, 9 months ago,

Can anone help me in doing this problem? I tried looking at some solutions but couldn't understand. https://atcoder.jp/contests/practice2/tasks/practice2_c

• +12

By Virtual_Contestant, history, 11 months ago,

Hello everyone, How do I do this question on CSES involving point updates using merge sort tree ONLY? https://cses.fi/problemset/task/1144 Please I want to know if this is solvable using Merge Sort Tree only please don't suggest any other method :D. Thanks

• 0

By Virtual_Contestant, history, 11 months ago,

Hello everyone, How do I do this question on CSES involving point updates using merge sort tree ONLY? https://cses.fi/problemset/task/1144

• +3

By Virtual_Contestant, history, 11 months ago,

Hello everyone how to solve this problem using 0/1 BFS? https://www.e-olymp.com/en/contests/16775/problems/173744

• -1

By Virtual_Contestant, history, 11 months ago,

I have solved this problem but I wonder how to do this using binary search i do have one idea but i am a bit lazy to implement that because i also think that might TLE. Can you guys please help me in this. https://codeforces.com/contest/1203/problem/D2

• 0

By Virtual_Contestant, history, 11 months ago,

Link your Codeforces account with your ICPC account if you have one. This is an optional step, but it will allow you to put you in the correct results table in ICPC Challenge 2020, simplify Codeforces authentication, and put you in additional result tables (for example, "ICPC finalists").

• -38

By Virtual_Contestant, history, 12 months ago,

Hello everyone, can anyone help me solve this problem using DSU? It would be more great if you do some modifications in my code only. Thanks. i know my code is wrong largely but please help me. https://ideone.com/Bwwo5x https://codeforces.com/contest/277/problem/A

• 0

By Virtual_Contestant, history, 12 months ago,

Hello everyone, can anyone help me solve this problem using DSU? It would be more great if you do some modifications in my code only. Thanks. i know my code is wrong largely but please help me. https://ideone.com/Bwwo5x https://codeforces.com/contest/277/problem/A

• 0

By Virtual_Contestant, history, 12 months ago,

Just wanted to know, what is the point of hiding GYM submissions? It is like seeing a question and leaving it without learning anything from it if you aren't able to solve it. GYM problems are really nice and educative. Some of them are really old so making the GYM submissions accessible for all would be great for learning.

• +11

By Virtual_Contestant, history, 12 months ago,

• -1

By Virtual_Contestant, history, 13 months ago,

Can anyone tell me how I do this using binary search?? https://codeforces.com/problemset/problem/1250/L

• -11

By Virtual_Contestant, history, 13 months ago,

Hello everyone, Can anyone just confirm how the graph of cost and the final height (same for all) would look like in this question? What I think is it would be unimodal function (having exactly one minima) but i don't know if it is correct. please tell me so i can edit. i just wanted to know just how graph of total cost for modifying all sticks to some particular same height would look like w.r.t to that height. please please help me https://cses.fi/problemset/task/1074

• +7

By Virtual_Contestant, history, 13 months ago,

Hello everyone, Can anyone just confirm how the graph of cost and the final height (same for all) would look like in this question? What I think is it would be unimodal function (having exactly one minima) but i don't know if it is correct. https://cses.fi/problemset/task/1074 UPD: any reason for downvoting? please tell me so i can edit. i just wanted to know just how graph of total cost for modifying all sticks to some particular same height would look like w.r.t to that height

• -8

By Virtual_Contestant, history, 13 months ago,

Can anyone please explain me the problem? i have been trying hard to understand this. https://www.e-olymp.com/en/contests/16462/problems/170299 the asked for maximum distance so in their second testcase isn't from 4 to 5 the distance is minimum?

• 0

By Virtual_Contestant, history, 13 months ago,

• +13

By Virtual_Contestant, history, 13 months ago,

Given n segments, we need to choose k of them, such that intersection of chosen segments has maximum possible length. Thanks a lot. Question link : https://codeforces.com/contest/754/problem/D

• 0

By Virtual_Contestant, history, 13 months ago,

Can anyone please explain the solution for this problem? I have looked at multiple solutions and editorial but unable to understand from them. Thanks a lot. https://codeforces.com/problemset/problem/804/B

• 0

By Virtual_Contestant, history, 14 months ago,

https://www.codechef.com/RC122020/problems/RECNDNUM This problem can obviously be solved using mathematical formula but i was wondering about the binary search approach to solve this. Any help would be really appreciated since I am having a lot of trouble with it. Thanks.

• 0

By Virtual_Contestant, history, 14 months ago,

Hello everyone, hope you are all fine. Talking with reference to this question, how to identify if a particular question can be solved using binary search efficiently? Most of the time binary search doesn't seem to come in my mind while thinking about a problem at all just like this problem. https://codeforces.com/contest/1201/problem/C

• 0

By Virtual_Contestant, history, 14 months ago,

Hello everyone can you please tell my why we divide elements as n/m and n/m + 1 in order to minimize the pair of friends. Please help i have my exam tomorrow https://codeforces.com/contest/478/submission/77214745