### codingkshatriya's blog

By codingkshatriya, history, 5 weeks ago,

Chronology of events :

1) Solved problem 2, submitted, got "correct answer"

2) Solved problem 3, submitted, got "correct answer"

3) Coded problem 4, got some errors in testing, debugged it, clicked "test" button got Please wait, fetching code

4) Thought it is some server issue, moved to problem 1, coded it and clicked "test" button, got Please wait, fetching code

5) Moved to 5th problem, tried solving it, couldn't get a concrete idea

6) Tried submitting 1 and 4, got the same issue

7) Copy pasted the test link in a fresh window, continued with the contest and tried submitting again, this time got Error: Connection lost.

8) Tried minimizing the window and checking the internet connection, got warning "Go to fullscreen in 10s", checked internet connection worked fine.

9) Tried submitting multiple times but in vain.

I wasted a lot of time and was not able to submit 2 problems. Any help or guidance would be great ?

Did anyone else face this issue ?

Tagging people whom I think would be able to help Ashishgup

• +4

By codingkshatriya, history, 3 months ago,

In the wake of current contests, observation has become very crucial in every problem, thinking from the problem statement and trying to reach the solution is no longer easy, because the crucial observation is no longer easy to arrive from the problem statement alone, I think we have to start from random points and see if we can reach solution from there.

Let's take today's C (Edu round 99), the crucial observation here is Bob can't win more than y matches, and there is a way for him to always win y matches, this was not easy for me, I saw the high number of AC's lowered my thinking scope, saw the sample, observed the pattern then tried to justify it. If there had been no sample, and I had not seen the submissions, I probably would have taken more time.

And unpredictability factor has increased, sometimes you get the observation in a few seconds, and at times you never get it, this definitely has impacted the ratings.

Any suggestions or comments on this are welcome.

EDIT : Some have misinterpreted my post, I am not complaining nor am I urging the problem setters to change the format, my post is more about how to tackle these kinds of problems, before screaming practice, add me as your friend have a look at the number of problems I have solved in the standings. And regarding unpredictability, I think it makes sense, even experienced coders at times have a blind spot, and relatively young ones may get that observation immediately, that's why I said it's more about the thinking style.

• +163

By codingkshatriya, history, 3 months ago,

I would like to hide the problem tags in Mashups, is there any way to do that ?

• +1

By codingkshatriya, history, 4 months ago,

I came across this site (https://kenkoooo.com/atcoder/#/table/ ) that quantifies the difficulty of atcoder problems,but I was wondering how it would relate to CF difficulty, Any inputs would be great

• +3

By codingkshatriya, history, 5 months ago,

How did so many people get D right ? more than 2000 ppl got AC, just curious, my Approach was F[i] be the answer if string starts from i,

if(str[i]==str[i+1])
F[i] = F[j] + 1


where j is the first index diff from i,

else
F[i] = F[i+2] + 1


, this approach though wrong, seemed extremely obvious, so those who sovled it in contest did you land on the right approach initially itself, or did you land on the above mentioned approach then realized it's wrong and then moved on ?

• -25

By codingkshatriya, history, 6 months ago,

MikeMirzayanov Problem 1183H - Subsequences (hard version) has difficulty rating of 1900, which is less than it's corresponding easier version 1183E - Subsequences (easy version) of rating 2000, and the only difference between them is the constraints, can you please look into it?

• +14

By codingkshatriya, history, 7 months ago,

Given a binary array, convert all the elements to zero Array (array with only zeros) in minimum number of steps

In one step we can choose any 2 adjacent elements and flip them together, or you can choose the last or first element and flip that particular element alone.

Input : N ( 1 <= N <= 1e5) Array elements ( 0 <= a[i] <= 1)

Output : Minimum number of steps to convert the binary array to all zeros

Sample : [1,0,1] Anwer is 2 ( one possible way is choose the second and third elements, flip them and then choose the first and second elements and flip them)

Can anyone help me solve this?

• +13

By codingkshatriya, history, 7 months ago,

I understand the entire solution except the part " The probability of reaching any particular green square is the same for all but the green square in the last row", I don't get it why the last row is any different?

My understanding of the solution : We take all the squares which are the extension of the diagonal of the removed rectangle part. We have to pass through one of these squares in order to reach the destination and once we get to these squares the probability of reaching destination is 1. Since there cannot be interesction between these paths, we individually find the probability of reaching each of these squares and add them.

Can anyone please explain how the last row is any different?

My code : https://ideone.com/FIGKWD (got WA)

• -4

By codingkshatriya, history, 7 months ago,

Given an Array, find the maximum difference between the sum of elements in odd indices and even indices. To achieve this you can delete any number of elements from the array,after deleting the elements,the array will be re-numbered.

Example : 1 4 8 2 6

Upon deleting 1,4.

New array 8 2 6

Constraints : 1<=N<=1e5

• 0

By codingkshatriya, history, 14 months ago,

I read the editorial,but the last part,the "second way" is not clear,can anyone please help me out? 962E - Byteland, Berland and Disputed Cities

• 0

By codingkshatriya, history, 14 months ago,

MikeMirzayanov Several of the old contests don't have solutions,and even some of the new ones like Codeforces Round #609 (Div. 2) don't have solutions.

Though the contestant is expected to implement the solution on his own after reading the editorial,but at times,when editorial isn't elaborate enough or if the contestant couldn't get the implementation part,a peek at the solution would be really helpful.

Though we can view other's submissions,but most of the code is not written for reading purpose,and the approach may be completely different from that given in editorial.

It maybe inessential for top coders,but for novices like me,it could be a boon.