death_bringer's blog

By death_bringer, history, 16 months ago, In English

My submission 185845851 is getting accepted while another submission 185834138 with the same logic is failed on test case 2.

The only difference is

answer = i;
break;

in accepted vs

answer = min(answer,i);

in failed.

As the value of i is increasing second code line should also give the same output as the first one but it's not.
Please help me where I'm missing something.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By death_bringer, history, 21 month(s) ago, In English

To get straight to the point. I know the basics and implementation of segment tree but I can't solve problems using it. Because I don't know its applications and advantages (Practical ones).

So can anyone have a list of problems going from easy to a medium level so that I can try to get my basics straight?

I kinda have the same problem for DSU. So, If anyone has list for that, please share it will be very helpful.

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By death_bringer, history, 2 years ago, In English

Hello, codeforces,

Getting to the point without wasting time. Why not mike just lock/delete the profile of cheaters (regular offenders not one-timers)? Wouldn't it be better or Is there a reason behind it? I mean it would discourage people with high ratings to cheat, and people with old profiles.

I just genuinely want to know why codeforces don't do this. or Is this already implemented?

Full text and comments »

  • Vote: I like it
  • -10
  • Vote: I do not like it

By death_bringer, 2 years ago, In English

Hi Codeforces, At this point, I'm doing competitive programming for about a year on and off Codefores. When I started out I had a lot of questions about a lot of things but thought to myself that experience would teach me. But at this 1-year mark, I still don't know a lot of things that even new programmers do. Here's a list of questions:

  1. Why use such a big template with so many macros and functions? I have solved problems till 1800 rating but never felt a need but nowadays every solution I see for hacking is using these templates. Is there any reason behind them?
  2. How to be friends with authors (to be a tester)? I spend a lot of time on codeforces doing stuff like stalking good programmers, checking out top comments and blogs, and rarely messaging some people to get help but how do people just become friends on codeforces?
  3. A lot of time I get a WA because of integer overflow. So, I want to use the biggest possible data type for all variables. Is that ok or it can cause problems?
  4. Many people on codeforces know a lot about how a particular piece of code or function can slow down your code. How can I know it because I waste a lot of time on things I didn't know and had no way of knowing on my own? Like endl is very slow and can cause your TLE and in-built sort shouldn't give try condition (a,b) and (b,a) comparison.
  5. I generally don't check the editorials of problems but check out the test cases on which my solutions have failed. Is it bad because recently my frequency of submitting a wrong solution during a contest is increased?
  6. I'm not getting better at DP and most problems that were on my rating but I'm not able to solve are DP-related. I did cses problem set and its book. DP contest at AtCoder but I think I'm only learning and remembering types of problems in DP but not how to approach a new DP problem.

Full text and comments »

  • Vote: I like it
  • +14
  • Vote: I do not like it

By death_bringer, history, 2 years ago, In English

Recently I have come across a lot of very useful websites which have existed for years that I didn't knew about from some comments and blogs discussing about them. I want to request any experienced user to please write a blog (like this one if possible) compiling important websites related to competitive programming (vjudes, cp platforms, practice platform, etc.).

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it

By death_bringer, history, 2 years ago, In English

Hi, codeforces, Getting straight to the point my submission 143634261 failed at system testing and gave me a runtime error at test case 14. I tried searching about it but the only useful resource I was able to find is this blog but my code can't go beyond the limit and can't go negative. So, please help me.

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it

By death_bringer, history, 2 years ago, In English

Hi Codeforces,

I once again ask for your support

Here is my story before coming to question:

As you can see in my graph that my rating was increasing slowly and steadily and I was very happy with that but at the same time the pressure was building up that if I messed up any one of three problems I solve in the contest my rating is gonna fall. And in the last contest, this finally happened. I messed up on 1627A - Not Shading (yup at the very start) where instead of reading the statement properly I directly jumped on implementation. And implement something completely different (also a bit difficult) which took me about 35 minutes (Yes, I know even in that 35 mins I didn't realize my mistake). After realizing my mistake I started panicking and took another 10 mins to implement problem A. At this point, I was about 1 hour into the contest and haven't submitted a single solution but still decided to submit my solution A and officially participated in the contest (I don't know why). As I was about 7K below my usual rank my brain overloaded and fu*ked me over completely. I was not able to solve 1627B - Not Sitting or 1627C - Not Assigning and got completely annihilated in the contest. Now after the contest I was able to solve both of them easily (I mean equal to the amount of effort it takes me usually).

So, How you guys able to overcome this pressure and continuously perform equal to your level?

I also wanted to my story because I don't have friends who are interested in CP.

Full text and comments »

  • Vote: I like it
  • -18
  • Vote: I do not like it

By death_bringer, history, 2 years ago, In English

Hi Codeforces, I was trying to solve yesterday's 1622C - Set or Decrease and made this submission which failed at test case 3 but after a bit of cleaning up In code I made this submission and this was accepted. Can anyone please help me and explain why this happened?

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it

By death_bringer, 3 years ago, In English

During Upsolving, I have seen that some problems can be solved using the prefix sum method way more easily and efficiently. Which topic is new for me. So, I tried practicing it from cses problemset but it has only 3-4 problems related to prefix sum and codeforces doesn't have any Prefixsum tag for problems.

So, What would be the best way to practice prefix sum problems.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By death_bringer, history, 3 years ago, In English

I checked the winner list of the Codeforces Round 729 (Div. 2) for motivation and how much they practiced to get the top rank. I noticed something peculiar about the winning accounts that almost none of them have given more than 10 contests. Then I checked some past Div 2 winners and it is almost the same in every contest eg Codeforces Round 728 (Div. 2) and Codeforces Round 721 (Div. 2). Then I check some top-rated coders and even they started with the almost 1-2k standing/ranking. Why do you think that now the newcomers to CP are this good from the very start? or is it just my confirmation biases?

P.S: I don't want to tag the people I'm talking about as it may waste their time. You can check the winners from contest announcements if you want.

Full text and comments »

  • Vote: I like it
  • -17
  • Vote: I do not like it

By death_bringer, history, 3 years ago, In English

Hi, Codeforces community, I am new to the platform and want to know where should I post doubts for old problems. As I was solving graphs problems I came across some problem for which I was able to find a brute force solution but not the graph-based solution and their editorials have discussed the same brute force solution. So, where/Who should I ask for the graph-based solution because almost everywhere on the internet I can only come across the same brute force solution. Codeforces is warning me not to do necroposting on the old editorials so, I think posting doubts on that editorial is not a good idea.

I'm fixated on solving problems marked as graphs by using graphs, not brute force. So, I can develop my graphs as it is weak and to develop thinking how should graphs can be applied to various situations.

P.S: English is not my primary language. So, please go easy on my grammatical mistakes.

Full text and comments »

  • Vote: I like it
  • +46
  • Vote: I do not like it