Virtual_Contestant's blog

By Virtual_Contestant, history, 4 years ago, In English

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?

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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

Submission

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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?

UPD : Please help

This is my submission

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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.

https://atcoder.jp/contests/abc178/tasks/abc178_e

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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.net/contest/1203/problem/D2

Full text and comments »

By Virtual_Contestant, history, 4 years ago, In English

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").

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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.net/contest/277/problem/A

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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.net/contest/277/problem/A

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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.

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English
By Virtual_Contestant, history, 5 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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?

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English
By Virtual_Contestant, history, 5 years ago, In English

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.net/contest/754/problem/D

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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.net/problemset/problem/804/B

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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.

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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.net/contest/1201/problem/C

Full text and comments »

By Virtual_Contestant, history, 5 years ago, In English

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.net/contest/478/submission/77214745

Full text and comments »