Geothermal's blog

By Geothermal, history, 15 months ago, In English

After reaching 3200 in yesterday's contest, now feels like as good a time as any to hop on this bandwagon. Feel free to ask questions in the comments and I'll respond to as many as I can.

A few sidenotes:

Thoughts on Practicing

In my streams, by far the most common questions I receive are variants of "how can I improve at competitive programming?" I'm happy to offer advice if people have specific questions about training related to their particular circumstances, but I wanted to write down some general thoughts so that I can redirect people who ask about general practice strategies (in this AMA or in my future streams) to this post.

I endorse most of the advice given at this link. In short, I recommend solving problems around or slightly above your skill level (I like to go to clist.by and choose Codeforces problems with luck between around 25% and 75%). If you run out of ideas and get totally stuck, you can look at the editorial--usually I try to just read the first part I haven't figured out already and then solve the rest of the problem on my own. (I don't have a specific timeframe for looking at the editorial; usually I give up whenever I feel like I haven't made any progress for a while and am unlikely to come up with ideas in the future, or when I'm bored of the problem.) I almost always implement solutions to the problems I attempt to make sure I haven't missed anything. (I think this is especially important after reading editorials in order to confirm that I really understood the solution.)

If the solution to a problem relies on an algorithm you haven't seen before, I suggest reading about it in e.g. CPH, CP4, cp-algorithms, or USACO Guide. Afterwards, solve a few related problems to make sure you've picked up the general idea. I don't recommend spending much time learning algorithms before related problems have come up in your training, since this strategy risks spending too much time on ideas that aren't relevant to the problems you need to solve in-contest. (One exception is that if you're just getting started, you should learn the basics of programming--in C++, this includes things like conditionals, loops, functions, etc, as well as the STL data structures, but not memory management, advanced topics related to e.g. pointers, or any object-oriented programming--and big-O complexity before doing anything else because these ideas are foundational to almost every problem you'll solve.)

Gauging Interest in Lockout Tournament

I'm considering hosting another Lockout tournament similar to the 2020 Lockout Championship. If you'd be interested in competing in such a tournament, please click here:

Edits

Edit 7/31: I've received a lot of questions where people have asked me to review their profiles to see if they're doing anything wrong. If you've asked such a question, I'll take a quick look at your profile but probably won't have time to review it in depth aside from looking for obvious issues (e.g. not doing contests or upsolving consistently, exclusively practicing problems beneath your level, submitting lots of WAs on test 1, etc). I also probably won't have especially helpful responses to questions of the form "How do I reach X rank?" because my practice strategy outlined above is applicable to all ranks.

Edit 8/17: Thanks for all the questions, everyone! Another quick update: I'm no longer going to review individual profiles because doing so is relatively time-consuming and I don't think I've had any new comments or advice to offer in a while. Instead, consider reviewing the advice at the top of this post, at this link, and in the comments on this AMA. (I'm happy to continue answering other questions as long as people have them.)

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

| Write comment?
»
15 months ago, # |
  Vote: I like it -7 Vote: I do not like it

Is my rating graph normal?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +26 Vote: I do not like it

    It doesn't look too unreasonable for someone coming to CF without extensive programming contest background and doing most contests. It's possible that you could be practicing more efficiently, but it's also possible that you got lucky around December of 2022, your true ability in early 2023 was more like low-1200s, and you've improved by around 150 points since then, which seems like a fair pace.

»
15 months ago, # |
  Vote: I like it +2 Vote: I do not like it
  1. Have you ever done problemsetting? Have you ever considered setting a round on Codeforces?
  2. Do you participate on AtCoder?
  • »
    »
    15 months ago, # ^ |
    Rev. 2   Vote: I like it +11 Vote: I do not like it

    1: In high school, I set a few problems for USACO (e.g. here, here, here). I think the first two of these (and possibly the third) would be too standard to appear on a CF round; at the time USACO heavily favored more standard/educational problems. (I didn't mention it in my above post, but if you just want to learn algorithms I think 2015-2017 era USACO is a great way to do it.) In general, I'm better at coming up with problems based on real-world situations than at coming up with mathematical ideas that lead to good problems, and as a result I don't think I'm great at setting non-standard or difficult problems.

    Some friends and I did some preliminary work to organize a Codeforces round, but it petered out when we didn't have enough problem ideas. I do have a D1A/Bish level problem that I think might be good enough to appear on a CF round, so if anyone is organizing a round and needs a problem at that level, feel free to hit me up :)

    2: I used to participate more frequently than I do now (most of my early blog posts are ABC editorials), but AtCoder contests are at 7 AM for me and I'm not good at concentrating after waking up that early. Since ABCs switched to an eight-problem format, they're no longer a pure speedrun contest for me, and it's not worth resting enough to fully focus on a contest but only get 1-2 problems that are challenging for me. I also stopped participating in ARCs because I'm subjectively not a huge fan of the style of the recent rounds; the last few times I've competed it felt like the main differentiating problem at my rating level was basically just a matter of finding a pattern using a brute force program, guessing that a randomized solution is good enough, etc, rather than logically deducing the solution path.

    I have heard very good things about AGCs and am hoping to compete in those more often. (I didn't compete today because I had an ICPC practice with my teammates.)

»
15 months ago, # |
  Vote: I like it -54 Vote: I do not like it

do you agree that k-pop is evil?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +78 Vote: I do not like it

    Who cares lol, just let people enjoy things

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +23 Vote: I do not like it

    My first team at Swarthmore is named K-pop: link

    My opinion is, if you think K-pop is evil, you must be consuming way too much southern K-pop. I sincerely recommend you to try K-pop originating from the Democratic People's Republic of Korea.

    If you want something to start with, search "Moranbong band" first.

»
15 months ago, # |
  Vote: I like it +8 Vote: I do not like it

What you planning in the future if you not doing CP anymore?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    My future plans are TBD (and are not mutually exclusive with competitive programming), but I'm currently planning to do a Ph.D (probably in econ but possibly CS) and then go into academia. Right now, I'm especially interested in studying mechanism design problems under computational complexity constraints.

    • »
      »
      »
      15 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      What is/was your major in college? Are you interested in AI/ML?

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        I studied math and economics in college. I haven't studied AI or machine learning closely and currently don't have plans to do so in the future.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is NoThisIsJohn the typist your brother?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Which strategy do you use to solve problems during a contest??

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It might help if you could make the question a bit more specific--I don't think I really have a particular strategy; I pretty much just read the problems and try to solve them.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I mean what do you do after you read the problem you start implementing it or do some paper work

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Unless I immediately see how to solve the problem, I usually write down ideas on paper. It's often helpful for me to write out the sample cases and work them out by hand. In some harder problems where it seems like the main challenge is finding some sort of pattern in the answers, I'll also write a brute force program to output answers for a large number of small cases in order to try to notice a pattern.

        • »
          »
          »
          »
          »
          15 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Do you think typing speed matters

          • »
            »
            »
            »
            »
            »
            15 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            It matters a lot if you want to win Div. 3/Div. 4 rounds. Otherwise, typing quickly helps some, but once you're above ~60-70wpm it probably isn't a very significant factor in determining your success in CF rounds.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you think a person of average intelligence could reach lgm? If not, what is the highest rating you think that they could reach.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    I have no opinion on this; I'm not an expert on intelligence. I also think raw intelligence is very hard to separate from external factors (e.g. parental support, access to educational resources, etc), which makes it difficult to understand how intelligence contributes to CF ability.

»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

What are the practice sites you used other than codeforces and atcoder

Div1 F vs AGC F, which problem is harder

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    Right now I mostly practice on Codeforces, except that I use qoj.ac for VCs to train for ICPC WF. When I was in high school, I mostly solved problems from USACO (I still think the contest problems from around 2015-2017 are good if you want to solve relatively standard problems that focus more on algorithms than math). I also used to do CodeChef contests, but I stopped when they discontinued Cookoff and Lunchtime.

    • »
      »
      »
      15 months ago, # ^ |
      Rev. 2   Vote: I like it +34 Vote: I do not like it

      Re: your second question: My best guess is that AGC F is usually harder, but I don't have a strong opinion since I'm usually unable to solve either of them :)

»
15 months ago, # |
  Vote: I like it +1 Vote: I do not like it

I am now in a situation where I am able to solve a 1900-2100 rated problem about 15-20 minutes after contest that I could not solve during contest. Is there a way I could deal with it?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    After contests in which you narrowly miss 1900-2100 problems, think carefully about what you could have done to come up with the solution more quickly and how you'll solve similar problems when they come up in the future. Outside of contests, spend time solving 1900-2100 level problems from the CF problemset.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello!

One question:

Tell me how and what algorithms you studied and tell me in detail please.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    See the original post for a description of how I trained for programming contests.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

any sports?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

When did you start competitive programming and what was your background like before you started?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    I started competitive programming in fall 2015 (in 9th grade, age 15). Before that, I had a year or so of programming experience and five years doing math contests. For the following few years, I did some programming but mostly focused on math contests. Towards early-to-mid-2019, I mostly switched over to competitive programming, and I've been focused on programming contests since then.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How much did your math background help you in competitive programming? And in competition math and competitive programming were you mostly alone or did you have a group to study with?

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it +8 Vote: I do not like it

        My math background was very helpful; having practice thinking about mathematical problems and understanding some basic combinatorics theory made it a lot easier to get started with competitive programming. (DP in particular made a lot more sense because I had already done DP by hand lots of times on math contests.)

        I had a local peer group I met with once a week in middle/high school to prepare for math contests. I didn't have any competitive programming peers in my local area until I met my ICPC teammates, but I spent a lot of time discussing problems with online friends. (I thought this was very helpful, both to get help with problems and as a chance for some friendly competition. Empirically, a lot of people in that peer group ended up doing quite well--two of them, William Lin and Walden Yan, ended up winning gold medals at the IOI.)

        • »
          »
          »
          »
          »
          15 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          What kind of math competitions did you do? Like AMC 10/12 or AIME?

          • »
            »
            »
            »
            »
            »
            15 months ago, # ^ |
              Vote: I like it +16 Vote: I do not like it

            I did Mathcounts in middle school. In high school, I did the AMC series (I did fairly well--in 2019 I had a 144 on the AMC 12, 11 on AIME, and 21 on USAMO--but never made MOP) and captained the Texas teams for ARML and HMMT November.

            I didn't spend much time on the Putnam in college since I had mostly transitioned to programming contests by then, and it was hard to justify preparing for an activity I could only compete in once a year when I was able to do several programming contests every week. I did take the Putnam last fall just for fun; I scored 66, which was far beyond my expectations. I think I got lucky in that the problemset was great for someone who mostly studied competitive programming rather than the more Putnam-specific topics like limits, integration, trig identities, etc. It was pretty amusing to have my best ever math contest result come four years after I stopped training for math contests, though!

            • »
              »
              »
              »
              »
              »
              »
              15 months ago, # ^ |
              Rev. 2   Vote: I like it 0 Vote: I do not like it

              Thanks for replying! When you were training for the AMC 12 and the AIME what kind of resources did you use(Aside from previous AMC 12/AIMEs)?

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      What worked and what didn't work for you when you just started? And what would be your single most valuable tip for not getting hardstuck and constantly improve over time(both in USACO and Codeforces)?

»
15 months ago, # |
Rev. 3   Vote: I like it +38 Vote: I do not like it

Prescript: feel free to not answer any question if it's too personal.

  1. Why did you major in Economics and Mathematics? How was the college experience for you?

  2. What exactly does CP mean to you or how do you treat it (e.g. like a hobby, or like gaming)? Is it or can it become involved in your career?

  3. Was training to become LGM a decision or did it just come naturally? (I mean it sure required a lot of work) What was the training process like (e.g. was it too hard, enjoyable, ..) , and why did you choose to invest time in it?

  4. How did you feel like when reaching LGM for the first time? Ecstatic? Did you tell your family? Was it particularly a success to you, or was it like just being one of the best in some kind of gaming? At what part of your life did it happen? (In short, tell us the story of you becoming an LGM)

  5. How does CP fit in your day-to-day life with your full-time job? (This question can be similar to question 2, but I want to see how the routine of an LGM with other commitments in his life looks like, which is different from what CP means to you)

  6. What is the story of your handle?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +68 Vote: I do not like it

    These are good questions, thanks!

    1: Math was obvious; it's always been my favorite subject and I felt like learning more math was the best way to (a) leave my career options open and (b) improve my general critical thinking skills. Going into college, I was undecided between economics and CS, but I decided to major in economics after taking a few great classes and because even as a CS major, I would have been able to take only a limited number of CS classes because the Swarthmore CS department faces significant enrollment pressures. I also realized I was much more interested in CS theory than in most other fields of CS, and most of the theoretical CS classes were underenrolled and were thus not too hard to take as a non-major. (I do wish I had the chance to take a class on programming languages--I've heard from some friends that PL theory is really cool.) Overall, it was a marginal decision and I probably would have triple majored if Swarthmore allowed it.

    I really enjoyed the college experience. My math/CP background made it a lot easier to succeed academically, not so much because I had prior exposure to some advanced topics but mostly because (a) I had a very strong grasp on the basics, meaning that I didn't get tripped up by e.g. basic algebra and was able to instead focus on high-level problem solving, and (b) psychologically, I was already used to spending time thinking about hard problems and had practiced dealing with problems I didn't immediately know how to solve. I especially enjoyed taking math seminars (at the introductory graduate level) in my last two years. Outside of school, I made some close friends and was able to spend a lot of time having fun with them, especially after campus reopened post-pandemic.

    2: I essentially treat competitive programming as a hobby, and e.g. I generally don't try to force myself to train unless I feel like it. It's not involved in my career directly, but I think my competitive programming awards were a significant part of why I was hired for my current job, and they'd probably help if I eventually decide e.g. to go into software engineering or work for a quant firm rather than pursuing a Ph.D. I've also coached at various points to earn some extra money on the side.

    3: Starting in 2019 when I began to take CF more seriously, I was mostly focused on the next step at any given time, i.e. I didn't have LGM as an ultimate goal for the whole time. In early 2019, I realized I could probably become red and eventually made GM that summer. At that point, I pretty much immediately started thinking about IGM, and while I had a couple of significant setbacks I crossed 2600 the following summer. LGM took a bit longer, and I wasn't sure I'd make it that far until I crossed 2800 by earning +183 from a 6th-place finish in a Div. 1 round. At that point, I became pretty confident that I'd eventually make LGM and focused my training on crossing the 3000 mark.

    I enjoyed the process of training (largely because I didn't force myself to do it when I didn't want to), and I don't regret putting in the time to become LGM at all. (In practice, I think my CF practice mostly crowded out gaming/other unproductive hobbies rather than cutting into my actual productive time, so I think the opportunity cost for me was not too large.) I especially enjoyed CP because I was able to practice mostly by doing actual contests--there were times when I would average four live contests or so a week between CF, AtCoder, CodeChef, DMOJ, etc. (I'm very competitive, so the feeling of winning contests/improving my rating was a big part of my motivation to improve at competitive programming.)

    4: Yes, I was pretty thrilled. (There's an audio file, which I will not be releasing, of me screaming incoherently upon realizing that my 1:59:56 submission to D, which I hadn't run on samples, got AC.) At the time, I was expecting to make LGM eventually and I knew that each successive contest gave me a very strong chance at promotion (I was at 2973 in the round before I promoted), but once I actually pulled it off, it felt pretty amazing to finally achieve something that I had in some way or another been working towards for half my life (counting the time I spent doing math contests).

    I did tell my family; I'm lucky to have very supportive parents and they stay pretty up-to-date on my programming contest activities. (As a particularly extreme example, my dad stayed up from 11 PM to 4 AM to watch the Dhaka WF live.)

    5: The main way working makes training harder for me is that I can't compete in weekday rounds on days when I'm in the office. Otherwise, I essentially work a 40-hour week with flexible timing, meaning that it's not too hard to fit contests into my schedule. Recently, I've typically tried to think about a couple of problems during the week and then on the weekends, I compete in a live contest one day and do an ICPC VC with my teammates on the other day.

    6: Back in early 2015, I spent a lot of time looking for a new Minecraft handle (a very difficult task because usernames were unique and most of the good ones were taken). I was learning about geothermal energy at the time and thought it was really cool, and since it was available I used it as my name. I've used it ever since, partly due to inertia but also because I think it works well as a username (I think it sounds pretty good, it's available on lots of platforms, it abbreviates nicely to Geo for when I'm talking to friends, etc).

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks to you for the great elaborate answers!

    • »
      »
      »
      9 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Which one is harder reaching 2500 from 1600 or 3000 from 2500?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +2 Vote: I do not like it

    Really good questions and really good answers! Loved it

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Most enlightening problem(s) that you still refer to today and required their own trick?

  • »
    »
    15 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Two examples of tricks that I closely associate with specific problems:

    • This problem, where I learned the general problem-solving strategy of trying to simplify a configuration while keeping the answer constant in order to add additional constraints on the problem (here, combining edges in the way the editorial suggests adds the additional constraint that each vertex has degree at most two; [http://www.usaco.org/index.php?page=viewproblem2&cpid=1237](this problem) involves a similar trick that allows you to assume all vertices have outdegree at least two after some preprocessing).
    • This problem, where I learned the $$$O(n^2)$$$ tree DP merging complexity bound.

    That said, there are lots of problems I associate subconsciously with different tricks. I think a big part of why I've done well in competitive programming is that I'm good at taking away general problem solving strategies from the solutions to problems I fail to solve, so there are a lot of subtle ideas I've figured out by learning from past problems (this is why I recommend focusing on solving old problems in the original post).

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why did you choose Geothermal as your username? What is the story behind it?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What are your future goals/targets in CP?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +28 Vote: I do not like it
    • Win a medal (preferably silver or gold) at WF in November.
    • Qualify for Hacker Cup finals within the next few years, and ideally place in the top half.
    • If contests continue to go well, I might eventually aim to enter the top ten CF ratings, but that still feels far away at this point--I think I'd need to be much more consistent than I am right now to get there.
    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it +13 Vote: I do not like it

      Do you think Hackercup is getting canceled? I think information for the qualifying round was already out by this time of last year.

»
15 months ago, # |
Rev. 3   Vote: I like it -15 Vote: I do not like it

I feel like I am not Improving...

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    A few suggestions:

    • Your rating may improve if you compete more consistently (it looks like you went a long while without competing around last month). I usually underperform in the first few contests when I'm out of practice after a long break.
    • Focus on practicing D2B-level/1100-1300ish rating problems. The main thing you need to do to rank up to pupil is to solve D2B faster and more consistently than you are now.
»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

can you help me in figuring out. am i going in right direction by looking my rating graph ? i solved around 70 , 1200 rated problems but not able to reach pupil. is something wrong or it's fine ?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    My advice in the above comment should be applicable to you too, but another note is that your submission history has many WAs on pretest 1. You should almost never get WA on test 1 because you should be compiling and testing your code on the samples (and then debugging any errors) before submitting it to Codeforces.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    good progress for the last 11 months

»
15 months ago, # |
  Vote: I like it +1 Vote: I do not like it

I saw your results in competitions like Div 3 , Div 4 became interesting to me. How do you understand the condition of the problem so quickly? And you immediately after reading the problem have an understanding of how to solve it.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +16 Vote: I do not like it

    I'm a very fast reader, and I'm good at ignoring the unimportant parts of problems and picking out what's most important. Other than that, I've solved enough problems that most ideas in Div. 3 rounds feel fairly familiar, so I don't have to spend too much time thinking before I can type up my solutions.

»
15 months ago, # |
  Vote: I like it +16 Vote: I do not like it

Prescript: I'm sorry for asking too many questions :D. These are just some questions less related to CP and more related to Math (since you were a math major) that I also found interesting and thought it wouldn't hurt to ask. Again, feel free to not answer any of the questions.

  1. In your view, what is the relationship between Math and CP? Which parts of CP do you find largely Mathematical or Math in disguise?

  2. Do you find Mathematics beautiful? (I think the answer is yes, of course, but just to be sure :D) Can you describe how you feel about Math, its beauty, and the process of learning guided (in case of courses or readings) or unguided (in case of research)? What does Math feel like to you (may be even metaphorically)?

  3. What is one theorem/proof/lemma or piece of Math that you found particularly memorable and beautiful? Which one is your favourite?

  4. Which moment of problem-solving (may be in CP) or math research or practice that was the most memorable as one of your "Eureka!" or "Aha!" or "Ooouuh!" moments?

  5. Did you try doing Math research or do you consider it? If you did try it before, did you ever feel like CP was very useful in the process of Math research?

  6. What's your take on Academia vs Corporate Life? Why did you choose Academia, noting that corporate life can be more rewarding financially?

  7. If you felt like you can, what advice would you give to an undergraduate Math major who also does CP for fun? (May be about balance between both or how does one of them feed into another)

Thanks!!

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    I'm going to answer a few of these where I have immediate thoughts so that I can get to others' questions. I may come back to some of the others later if I think of good answers.

    1: Now more than ever, I view competitive programming as essentially a math contest in which (a) the topic distribution becomes something like 70% combinatorics, 20% number theory, 10% algebra, 0% (synthetic) geometry and (b) rather than writing proofs, your answers are verified by submitting to an online judge. The process of solving competitive programming problems feels very similar to the process of solving hard math problems (or rather, hard problems from a math contest or a math textbook; maybe not so similar to research on problems with unknown solutions). If you consider CS theory to be a branch of math, then programming contests are really all math except for implementation details, which ultimately play a small role in contest performance.

    5: No. I pretty quickly decided that I wanted to do grad school in either econ or CS because (a) much of the math that I'm interested in also falls under econ theory or CS theory (in fact, my current subfield of interest is studied by both economists and computer scientists), (b), I wanted to do work that felt a bit more connected to the real world than abstract math research, and (c), the academic job market for mathematicians is terrifying, whereas demand for Ph.D economists/computer scientists is strong in both academia and industry.

    6: I'm currently leaning towards academia because it offers more freedom to work on things that are interesting to me rather than on tasks assigned by someone else. I also like having a more flexible work schedule; one of the things I miss most about being in school is being able to work on my own time whenever I had energy, as well as being evaluated on completing a certain amount of work rather than on working a certain number of hours.

    Industry is obviously more lucrative, but my lifestyle isn't too fancy, so I can live comfortably without making an absurdly high salary. Past a certain point, having more money doesn't make me much happier or more fulfilled, so salary becomes a low priority compared to picking a job I enjoy.

    7: I don't have too much to say about this, other than that math and competitive programming go well together and more people should do both.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      Why do you say that the academic job market for mathematicians is terrifying? (Speaking as an undergraduate senior who aspires to continue math research and may have just gotten scared away XD!)

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it +15 Vote: I do not like it

        The situation may be different outside of the US, but I've had a lot of anecdotal experiences with e.g. math Ph.Ds from top schools having a hard time getting good places, math professors having to take multiple visiting positions before eventually landing a tenure-track jobs, very smart people struggling to finish the Ph.D, etc. In contrast, there are generally good options available for graduates of the top ~50 economics Ph.D programs, both in academia and in industry.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What do you think differentiates a person who is in Div-1 2500+ and Div-2 1600-? Is it purely on the effort you are putting in or do you think there is something else?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    The 2500+ competitor is much better at analyzing problems to quickly identify productive solution ideas. If you watch one of my Div. 3 screencasts, it may look like I have some sort of sixth sense that immediately shows me the solutions to the problems I'm working on. In reality, by solving so many problems and thinking carefully about how to come up with solution ideas, I've developed many subconscious heuristics along the lines of "when I see X in a problem, I should try doing Y". Div. 3 competitors haven't built up as many of those fundamental problem-solving patterns, which may be due to lack of effort but could also be inexperience, failing to think hard enough about how to come up with solutions, etc. As a result, when you can't solve a problem, your first step after reading the editorial should always be thinking about how you could come up with the same idea yourself. If you feel like the solution just came out of nowhere, it's sometimes helpful to talk to someone slightly more experienced than you who did solve the problem to ask them how they came up with the idea.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it +173 Vote: I do not like it

      Also, Andrew Tate is a total scumbag and you should change your username and PFP

      • »
        »
        »
        »
        9 months ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        Last USACO contest Andrew Tate got 1000/1000 in the gold division lol

»
15 months ago, # |
  Vote: I like it +1 Vote: I do not like it

I've noticed that you are also having a full-time 40h job. Any piece of advice for folks who are also working to be better at CP? Thank you, man! Your AMA is phenomenal!

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't think competitive programming requires an absurd time commitment that's infeasible along with a 40h job, so the important part is just being consistent about carving out time for practice. In my case, I've mulled over some problems during the week and have reserved substantial time on the weekends for programming contest-related activities.

»
15 months ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

Can you share your training schedule?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it -8 Vote: I do not like it
    Just don't tell anyone!
  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    See #5 in this comment for a description of what I do right now. Currently I don't put an absurd number of hours into training (maybe ~15 hours a week on competitive programming-related activities, including coaching sessions). My most intense periods of training came during the summers of 2019 and 2020; I didn't have a full-time job in 2019 and in 2020 my job was online and thus left me with a fair amount of free time, allowing me to practice for several hours a day.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is there any plan on starting the post contest discussion on youtube as you did previously?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'll likely do some streams going forward. However, my availability will be limited because I have work on the weekdays and spend at least one of the two days of each weekend doing a five-hour ICPC VC, so for the foreseeable future there will probably be at most one stream per week.

»
15 months ago, # |
  Vote: I like it +3 Vote: I do not like it

what do you think , when will your freind secondThread would become lgm

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +16 Vote: I do not like it

    I'll decline to answer this question since any answer I give might put undue pressure on him.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +18 Vote: I do not like it

    he has to become gm first lmao

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

can you tell your schedule of cp practice ?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How old are you?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hi.. could u suggest some good resources to improve math background in cp? i have been struggling a lot in math

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Chapter 22 of the Competitive Programmer's Handbook is a good place to start. If you don't have any background in combinatorics/discrete math (e.g. at the level of an introductory college discrete math course) and you want to practice math itself, you might consider Alcumus, a tool that gives you math problems and adjusts the difficulty based on your performance. Setting your focus to topics in counting and probability or number theory will be most helpful for competitive programming (in contrast, you can safely ignore all geometry problems). Even though these problems don't involve any programming, many of the general strategies are highly applicable to programming contest problems.

»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

How are you able to solve problems so fast? do you have really good intuition skill and or a combination of typing speed?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    See this comment and this comment. In short, I read/type quickly, I've been exposed to lots of different problems and am thus very familiar with many of the standard ideas, and I'm good at understanding how problems I'm working on relate to the ones I've already solved in order to apply similar problem-solving strategies.

»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I have asked this before in some AMA but would like to ask you too: What advise would you like to give someone solving Timus Archive and Project Euler? Also, tomorrow is my first day of job in the corporate world but I really dont like what I will have to do their. I want to enter into academia in math and problem solving and I have a bachelors in computer science. Is there something useful you could advise me related to this?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I haven't worked from either Timus or Project Euler, so I don't have great advice to give you on those platforms. (Note that if you enjoy PE, you should definitely do it for its own sake, but PE problems are not especially helpful if your main goal is to do well in programming contests.)

    The best advice I can give you re: academia is to get advice from a math professor at your university, if there's someone in the math department you know already. They will have a much better sense of your background and of the pipeline to academia from your school than I do and will thus be able to give better advice.

    The main thing I'd say is that research experience is one of the most important factors in entering a Ph.D program. If you don't have prior math research experience, you might consider entering e.g. a Master's program in math in order to take more classes and potentially do research with professors.

    Unfortunately, it can be very difficult to enter academia unless you've been preparing for grad school admissions since your undergrad years. You might also consider looking for positions in industry with a similar work style to industry that don't require a Ph.D.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you please review my profile.I feel like I'm not improving at all.Can you please suggest me how to proceed further

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    Aside from the advice in my original post, my main suggestion is to compete more consistently--so far you've done only six contests this year, three of which were in the last week or so, and you'll improve more quickly if you participate in contests more frequently.

»
15 months ago, # |
  Vote: I like it +5 Vote: I do not like it

I've recently realized that CP is about guessing and trusting intuition. Can you share some of your best guesses?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    I'll come back to this and update my answer later if I think of any good examples, but there aren't any remarkable ones that come to mind off the top of my head.

    Part of this is that when I make a submission based on a guess, there's usually something to back it up--either a proof, a strong intuitive justification, or the results of a brute force program confirming my claim. In contrast, I can't think of many times where I made a complete guess that turned out to work.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it +8 Vote: I do not like it

      I'd call intuition without logical thinking attached to it a guess. It doesn't matter if it's a "strong intuitive justification".

»
15 months ago, # |
Rev. 2   Vote: I like it +39 Vote: I do not like it

Honest opinion on competitive programming live broadcasts? I'm also interested in your dad's opinion :)

btw I volunteer to livestream every lockout you host with highest available effort

  • »
    »
    15 months ago, # ^ |
    Rev. 2   Vote: I like it +8 Vote: I do not like it

    I'm a big fan of the ICPC broadcasts! I've watched most of the NAC20 broadcast, all of the NAC22 broadcast, and the WF20 awards ceremony (and I attended WF21 live), and my dad watched all of the NAC20, NAC22, and WF21 broadcasts live. We both really enjoyed them--I've skimmed through some of the old WF streams, and it's clear that the production quality improved immensely through the 2010s. I think the ICPC Live UI is excellent and makes the contest much easier to follow. (My dad agreed--he turned on the NAC20 stream expecting not to follow closely and to do some work in the meantime, but told me later that his eyes were glued to the screen for the whole five hours.) We both really enjoyed SecondThread as the presenter at NAC22--just following the contest for five hours can get a little old, so I really liked how he integrated interviews with participants, coaches, and contest staff members into the stream.

    Some constructive feedback (not all of which is directly related to the broadcasts):

    • Not sure if this has already been added in more recent streams, but during the scoreboard freeze, the board is shown pessimistically (i.e., assuming all pending submissions are WA). It would be nice to also show an optimistic scoreboard (i.e., assuming that each team's last pending submission on each problem is AC and others are WA) to give viewers a sense of how the contest has evolved since the freeze.
    • The WF20 awards ceremony could definitely have been better organized. In particular, I don't think the teams earning High Honors or medals at WFI were recognized at any point during the ceremony. My team earned a bronze medal at WFI off of by far our strongest performance up to that point, so it was disappointing not to receive any recognition when awards were given out.
    • You probably have little control over this, but in case you're able to pass on feedback, there should be far fewer speeches. At WF21 in particular, it felt like we were hearing the same speeches from the same people over and over again throughout the whole week, which made the experience much less fun.

    I might take you up on your offer to livestream lockout! This is a long-shot, but I've been thinking it could be really cool to integrate a lockout tournament into the ICPC WF broadcast somehow. The ecnerwala vs Errichto Kotlin showmatch at the last WF was one of my favorite parts of the finals experience--watching the match live, surrounded by other competitive programmers, was the first time competitive programming felt like a real spectator sport to me. Here are a few ideas (which aren't very fleshed out)--feel free to DM me if you'd like to discuss further:

    • Hold an online tournament starting soon and broadcast the finals live from WF. It may be infeasible to fly the finalists to Egypt, so one option would be to hold the finals online but have a live showmatch between the two highest-ranked participants who are attending the finals.
    • Hold an in-person lockout tournament at WF (suggested by never_giveup). If sufficient time was reserved in the schedule, most of the tournament could be conducted outside of contest hours at the hotels, with participants competing against others within their same hotel. Then, the final matches between the winning contestants from each hotel could be held live at the contest venue and possibly broadcast by ICPC Live.
    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      The optimistic scoreboard has been available for a while; watch here in the NAC 20 stream

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Well, that's what I get for not having watched ICPC streams in a while :) Thanks for the info!

»
15 months ago, # |
  Vote: I like it +2 Vote: I do not like it

What inspired/motivated you to get started with math/programming contests. Did you always know you liked stem or logic related subjects, or did something new you learned at some point draw you towards the subject?

Also I'll ask a grey question because I wonder if you have any different advice for someone at my level: What would you recommend for me if I wanted to improve more? :)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Math was always my favorite subject in school, so when my family found out about a local math team (when I was ~10), they signed me up and I went from there. The organizer had a son who went to the IOI in the early 2000s, and she encouraged me to try USACO a few years later.

    Other than what I described in my OP, the main advice I have to you is (a) to compete more consistently (especially in Div. 1 rounds, but even doing Div. 2s is probably productive at your level), and (b) to compile and test locally. Your profile contains lots of compilation errors and errors on test 1, which should never happen if you're running your code on your machine before submitting it. I think I might remember seeing you mention using an online compiler at some point (though maybe I'm mistaking you with someone else)--I think having a local environment set up is much more efficient and is a good way of saving time during contests. (Plus, stress testing is a huge pain without a good local setup; stress testing is the one trick I actually do think is worth an immediate >100 rating points.)

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

what should i do to be better ?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Practice more consistently, both by doing contests and solving problems outside of contests. If that doesn't work, see this post.

»
15 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Why don't you have a profile picture on Codeforces? :(

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to learn DP.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    Solve dp problems.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Learn the basics (e.g. in the Competitive Programmer's Handbook), then filter the CF archive to solve DP problems around your rating level.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Heyy! I want to ask u that is the python is good for cp? Like i was started cp almost 2 and half years ago and nothing had changed :( I was use to solve problems. Can u just give same advice how to improve? Or I should switch to another language? (Well I'm currently in 10th grade)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think using Python is a substantial disadvantage for competitive programming at a high level, but it probably isn't why you're stuck in gray. You might consider working on your mathematical thinking skills; see this page for one way of doing so.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it
  1. Is my rating graph normal and is the way of my practicing problems good enough(in view of rating and number of problems)?
  2. What suggestion you want to give if you must give one?
  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Your history looks fine at first glance, but you should participate in contests more consistently.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

any suggestions for me

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Solve more problems and participate in contests more consistently--you only have a handful of problems solved in the last month, most of which are from a Div. 3 round.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What I need to do to reach 1400(I can't compete with a permanent result, it fluctuates from D2A-D2 ABC)?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Solve problems and participate in contests more consistently. You can't really claim to be hardstuck green when you've only done three contests in as many months and you have less than one page of submissions since June.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you plan on doing post-contest streams on youtube as you used to? They were really helpful! And how is your team's practice going on for ICPC WF? Hoping to meet you in Sharm! ^^

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Your stream question is answered here. I'm pretty happy with how ICPC practice is going--prior to WF21 my team hadn't had the chance to practice together and I was very out of practice individually, so I'm glad that we've been able to get together for weekly practices in order to hopefully do better this year.

    Looking forward to seeing you and the other competitors in Egypt!

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

1) According to you, what is an effective way to learn a topic so that I can grow good intuition and identify it in real contest scenarios?

2) Also need a few tips on how to improve at cp at my level.

3) I struggle sometimes to know or it takes me a long time to realize it's impossible to solve a problem using a particular idea I had. What is your thought process like in canceling out ideas or approaches?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    point 3 is really a great question, i struggle with the same myself!

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    1 and 2 are mostly answered in my original post. (Looking at your profile, you might be better off practicing more consistently unless you're also solving a lot of problems on other platforms.)

    3: Aside from telling you not to spend too much time on any one idea, the most common indicator that you should give up on a solution idea is that you've had to split into a huge amount of cases trying to get it to work. For example, if you have a greedy idea, but you realize it doesn't work on some special case, so you come up with an alternate way to deal with that case, but then you find another case that approach doesn't work on, etc etc etc, you might consider that your original greedy solution isn't the right way to proceed.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can I buy you a milkshake?

»
15 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Congratulations on reaching 3200 :)

What is your favorite pokemon?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

can you give me any tips to reach IM? Thanks in advance. P/s : I love you Geothermal :P

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    See the original post. Looking at your history, unless you're doing a lot of problems on other contests, you'll need to do more contests and solve more practice problems in order to improve consistently.

»
15 months ago, # |
  Vote: I like it +9 Vote: I do not like it

1) Do you have a set of algorithms you rehearse or used to rehearse before important olympiads? 2) Do you have a set of approaches you try on problems? (For example: don't forgetto try divide and conquer) 3) I am currently getting ready for IOI, do you have any suggestions?

Thanks in advance!

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    1: Not really; aside from doing USACO casually, the contests I do don't require memorizing algorithms (ICPC allows contestants to bring in 25-page reference documents).

    2: No; my approach to problem-solving is more dependent on the problem. I think this post has very good advice on the problem-solving process. Generally, my approach involves trying to make observations to understand a problem better until the overall solution approach essentially comes to me. If that doesn't work, I'll think about a few common approaches, but rather than going from a predetermined approach I try things that seem relevant to the problem (e.g. when facing a problem with lots of queries on an array, I'll think about whether the operation can be modeled nicely using a segtree, whether I can reorder the queries in a convenient way, etc).

    3: My main advice is to make sure you've done the past few years of IOI, since many styles of problems that appear frequently on IOI don't appear on online contests like Codeforces and may appear rarely on national OIs. You don't want to be like those contestants in 2017 who tanked nowruz despite having strong Codeforces ratings.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What will you recommend me based on my profile? ( On how to get better, what to do next, resources, how to improve problem solving, and more unknown tips you could provide )

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    Aside from the advice in the original post, there's an unusually large number of problems in your submission history where you took very large numbers of penalty submissions before getting AC. If you compare my submission history to yours, you'll see that in official contests, I rarely have more than a few penalty submissions on any given test case. You should work on making this happen less frequently, e.g. by reviewing your mistakes after contests and coming up with strategies to avoid making them again. In particular, you should learn to stress test to identify where your solution is failing.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yes, I tend to become very anxious during the contest and feel like I have to read the problem and then straight away write the first solution that comes to my mind. If I can't make progress in the initial minutes then I feel that's it, this contest will end bad and I mess up everything from that point.

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it +16 Vote: I do not like it

        This is its own issue (perhaps you should try to worry less about your rating?), but I think it's separate from what I described. Even if you implement a wrong solution, you can still recover and have a good contest if you figure out what went wrong and get the next try right. If you spend a long time and several submissions trying to figure out why your code is wrong, though, you will do poorly, which is why it's important to learn to find a test case breaking your code on your own.

»
15 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Hey, I started to follow you in your 2600's, I am very happy that you have finally reached LGM and 3200 rating points. I'm actually training for Egypt II, you said you're using qoj.ac, can you be more specific about your training there, what contest you're doing? etc. Good luck and I hope to see you in the Top3 of Egypt I, (no pressures)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Recently we've done past WFs and UCup rounds. Other sources of good rounds to work from are the training camp section and high-level regional contests (e.g. SWERC/NERC, NAC, etc).

    Good luck at WF!

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What are some rarely used algorithms in ICPC that I should learn?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    I'm pretty sure I don't know any ICPC algorithms more rare than the ones that appear in KACTL (and I don't know everything in KACTL). In general, for ICPC it's more important to practice solving problems than to learn esoteric algorithms.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you think recently in div-2 contests the problems are becoming harder than the previous years? If you think so, what do you suggest for people like me to learn or practice to improve more?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't think there's a huge difference in difficulty between current and past Div. 2 rounds, but I haven't followed them closely enough to be sure.

»
15 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Congrats Geothermal , on unbelievable achievements so far & I think we are of same age group but with a lot difference.. Please guide me, I want to be CM(1900+) as early as possible. I have practiced more than 1400 Qs on CF so far (Practice ID Link : daddy_dynamo )(https://codeforces.me/profile/daddy_dynamo)

Thanks

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    Aside from the advice in the OP, you should participate in contests more consistently on your main account (secondary accounts are prohibited by Codeforces rules).

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Okay will be solving from this account only now onwards consistently!! Thanks

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Math-related question: Do you have any tips for studying challenging math subjects? I am currently working through graduate-level textbooks and often encounter topics that seem exotic, making it difficult to find alternative explanations elsewhere.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Do lots of problems and take detailed notes on the readings. I've found that having my own notes (a) forces me to make sure I understand the proofs as I read them and (b) is useful as a reference while reading later sections or solving problems.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I now this may be a bit late but I've always wondered why you chose to attend a liberal arts school like Swarthmore for your undergrad instead of a more engineering focused one especially since it seems like you had the extra curriculars to get into top engineering schools like MIT and CMU or top public like UIUC or GA Tech.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    Among other reasons, I'm not especially interested in engineering and Swarthmore is consistently one of the top colleges in the country by number of students who eventually receive Ph.Ds (see e.g. here) and for Ph.D placements.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it
  1. Any tips on getting into GM? (Especially because I often brick 2400-ish problems on contest)

  2. And do you have any kind of strategy to avoid getting stuck on one approach for a problem? (On a recent contest, I was stuck trying to get a DP solution. But turns out the solution was using greedy an a bit of math)

Thanks

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    1: Aside from the advice in the OP, you should solve practice problems and compete in contests more consistently. One way to practice solving 2400s in-contest is to do Div. 2 rounds, which usually have a 2400ish problem around position E/F.

    2: See #3 here.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What are your favorite books (if you have any) that go beyond the topics of competitive programming and focus on problem-solving in general (books about human thought process, cognition, etc. — the good stuff)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I haven't read much about cognition--happy to take recommendations if anyone has any!

»
15 months ago, # |
Rev. 3   Vote: I like it +3 Vote: I do not like it

How about your lifestyle? 1. Do you usually exercise?

  1. Are you eating food that is considered healthy

  2. Do you drink coffee / tea?

  3. Are you sleeping 8+ hours consistently?

  4. Do you think AtCoder problems might be better than CodeForces for a "beginner"?

I am asking this because often it happens to me that after thinking about a problem that I can't solve, my head starts to hurt, and quite frankly I don't know if it is because of the fact that it challenges me or because of my sleep.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I wouldn't describe my lifestyle as especially healthy, although I am pretty consistent about getting eight hours of sleep each night. I don't drink coffee or tea.

    Both AtCoder and CF problems are fine for beginners and working on either is fine, depending on your personal preference.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Now that the world is coming to an age of AI do you think that competitive programming problems will get more importance in real world?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't see any reason why they would, but maybe I'm missing something.

    (In fact, I think the opposite effect is much more likely--if AI becomes strong enough to solve competitive programming problems, then online programming contests will probably die out.)

»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hi! I'm a postgraduate student which majoring in CS. Around 5 month ago, it's my first time, saw a blog about CP, and addicted to it. Trying to learn some typical techniques.

Now, I can solve ABC's C/D and maybe E problem. (BTW, sometimes I can see your great editorial in ABC)

BUT I have to say that spend me a lot of time (4-5 hours a day). My work schedule has been SLOWED DOWN.

SO, my question may be a little difficult to answer:

Q: For those people just like me, as a beginner, playing CP as a hobby. How to balance their work and CP and life ?
  • »
    »
    15 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Outside of maybe a few bursts of intense practice, I don't think I've ever consistently spent 30+ hours/week on competitive programming for an extended period of time. In general, school/work should come first; it's not worth falling behind on real-world obligations to practice programming contests.

    One bit of advice is that it's a good idea to keep a problem or two in the back of your mind so you can think about it in your spare time (e.g. during dull moments in classes). You can get a lot of extra practice time just by having a problem to think about when you aren't doing anything else.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Any advice for me?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Solve practice problems and compete in contests more consistently.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why you handle is Geothermal?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Please suggest me some ways to overcome my saturation level in CF rating?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Aside from the advice in the OP, your submission history contains lots of penalties on test #1. If you're compiling and testing your code on your PC, you should essentially never fail on the first test case when you submit to Codeforces.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      why not submit if test #1 doesn't count towards time penalty?

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it +27 Vote: I do not like it

        Waiting for a verdict is much slower than running code locally if your local setup is decent. Even if you think it's worth submitting directly the first time, you definitely shouldn't get WA1 multiple times because after the first try, you should be using your local setup to test with debug output rather than resubmitting to test.

        • »
          »
          »
          »
          »
          15 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          You're right, but I feel like it is still very helpful for some problems where the answer has to be verified (especially interactive problems) and you can't immediately tell if it's correct

          • »
            »
            »
            »
            »
            »
            15 months ago, # ^ |
              Vote: I like it +8 Vote: I do not like it

            Sure, although often for interactive problems the judge feedback isn't useful enough to debug with. In any case, when I've commented here on WA1s, it's because there are enough of them that I'm pretty sure they aren't only coming from interactive problems. One of the most common beginner mistakes I've noticed is not setting up a proper local testing environment, making it much harder to debug, hence why I've been commenting where I suspect this may be occurring.

»
15 months ago, # |
  Vote: I like it +1 Vote: I do not like it

I am genuinely interested in knowing how top coders like you spend their day. Do you watch anime, web series, or play any sports? And how much time do you spend daily practicing CP?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Recently, I've spent around 0-2 hours per day during the week and 3-7 hours per day during the weekend on competitive programming, including actual contests, practice problems, and coaching sessions. Outside of programming contests, I work a full-time job and enjoy reading, watching sitcoms, and playing video games with my friends.

»
15 months ago, # |
  Vote: I like it +5 Vote: I do not like it

I'm also curious about if there is some suggestion base on my profile :)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +18 Vote: I do not like it

    I don't see anything especially obvious--it seems like you're doing a fair number of problems that are suitably difficult for you, and you've been rewarded with your recent +100 rating boost. You should probably just keep practicing regularly and continue to compete in Div. 1 rounds.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you ever get distracted when you practice? Are there any strategies you use to try to avoid getting distracted?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Not really, which I think is largely because I don't force myself to practice when I don't want to. Once I do start focusing on a practice problem, I usually get pretty dialed in and don't frequently lose focus.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I have been studying algorithms for about a year and a half, and I have learned some basic algorithms. However, mathematics and dynamic programming are currently my weak areas. Sometimes, I lose control and end up looking at solution guides while solving problems. Do you have any advice for me? Thanks!

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't think there's anything wrong with looking at solutions if you've gotten stuck and run out of ideas--there will always be some ideas you weren't going to come up with on your own and it can make sense to learn them from the solutions. Other than that, the only advice I can really give is the same as in the OP (solve problems, look at the solutions to those you can't solve, and participate in contests consistently).

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Any thoughts on WF 2021-2022 being held at 2023?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    I'm not surprised given that the WF schedule has been a year off for a while now, but I'm glad they're hosting the 22-23 WF at the same time to get the schedule back in order.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Any suggestions based on my profile

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Follow the advice in the OP and solve practice problems more consistently.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you find competing in team based (like ICPC) or solo competitions more fun?

Also, what would you recommend I should try in order to improve? :)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I enjoy both! They actually don't feel too different because in team contests, my team usually divides up the problems according to our areas of strength, and so my job is essentially to individually solve the problems I'm best-suited to working on.

    See the advice in the OP for thoughts on improving; I don't see anything else obvious on your profile.

»
15 months ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it

Three questions for you Geothermal:

  1. Any tips and tricks for an IOI participant and ICPC participants, if there is any please share them

  2. I am currently working on getting to like 2200 next year, (i havent participated in recent contests but i feel like i've improved a lot to around 1600~1700), do you think it is possible?

  3. Would you work in quant? if so, what is the probability of it?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    1: Aside from the general advice in the OP, spend time on problems from the contest you're preparing for. For example, lots of high-rated CF participants tanked IOI 2017 nowruz by being insufficiently prepared for output-only problems.

    2: Depends on the person. In general, I think it's almost always impossible to answer questions of the form "how long will it take to reach X rating?" in a helpful way.

    3: Currently I'm pursuing a career in academia, but I won't rule anything out.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello! Is an X-rated task intended for people with an X rating?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    X-rated task means that people with X rating have 50% chance to solve it during the contest

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

If you stop for a while like 10 days what is the best way you think to come back safely?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    Ten days isn't that long of a break; if you solve a few practice problems to get back into form you won't have much trouble getting back on track.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

advice needed ovo

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    See the advice in the OP; I don't see anything obvious to add from your profile.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What IDE do you use for CF rounds?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    I use Vim. I've made a few minor modifications, but nothing too extensive (see my YouTube channel) for examples. In some contests, I use a simple command line tool I made to parse problems from CF and automatically test my code. (It's pretty similar to many existing competitive programming CLIs, but I wanted to make some minor tweaks and it was easiest to just set up my own.)

»
15 months ago, # |
  Vote: I like it -18 Vote: I do not like it

Hi, I need help in this problem from cses. This is my code where I implemented multiset. The overall time complexity of my code is O(nlogn),still its showing time limit exceeded.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Unfortunately, I don't have time to review all the code that is sent to me. You might consider making your own post or asking peers in some sort of discussion group (e.g. a competitive programming Discord).

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Are there any very niche algorithms you know? Such as ones that you rarely ever use but are still optimal in specific cases? If so could you give an example?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Not really; I think I know fewer advanced algorithms than most people at my rating.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Are you a twice fan

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What math and cp books do you recommend?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    See the OP for a list of competitive programming resources. For math, I found the Art of Problem Solving textbooks very useful; some free resources are linked here.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What data structures and algorithms do you know?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't keep an exact list, but roughly speaking I know almost everything in the Competitive Programmer's Handbook and most (but far from all) of the algorithms on cp-algorithms.com.

»
15 months ago, # |
  Vote: I like it +6 Vote: I do not like it

What are some of your fav fiction or non fictional books?

Also like what do you think about research in theoritical CS in general like there is a widespread notion that most of the theoritical research is useless.So how do you consider it being stuck in problems for years (unlike cf type problems) which wont be practical.Then where should the motivation come from.

  • »
    »
    15 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    My favorite book of all time is probably Flowers for Algernon. More recently, I've gotten into ASOIAF, though I'm growing more and more certain that the series will never be completed :(

    One reason to work on purely theoretical problems is if you find them beautiful or enjoy the intellectual challenge, even in the absence of immediate practical applications. However, there are still some areas of theory that have immediate practical applications. For example, many recent theoretical results in mechanism design, the research area I'm most interested in, have directly influenced settings such as internet ad auctions, school choice programs, electromagnetic spectrum auctions, medical residency matching, and so on.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

whats ur favorite math topic? (not cp)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    When I participated in math contests, my favorite area of math was combinatorics. Since then, I haven't actually had the chance to study combinatorics theory in more depth (e.g. I still have only a basic understanding of generating functions). Out of the topics I've had the chance to study in more depth, my favorite is real analysis--I enjoyed the process of converting a problem into a mental image and back into a solution. I also never properly understood Stokes' theorem when I took multivariable calculus (all of the motivating examples came from physics, which I've never been especially interested in or knowledgeable about), so it was cool to finally see it built up in a rigorous way using differential forms.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you know chinese contest such as noip or noi??

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The pastebin links in your CP Setup video seem not work anymore. Can you update all the links again ?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think this is an issue accessing Pastebin on your end; I just clicked all of the links and they work fine for me.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hello , congratulations to you ! my question is when I do cp, sometimes I spend 1-2 hours on one task and after solving it, there is a feeling instead of it, it was possible during this time to learn something else in It and the desire to do cp disappears. I wanted to ask if you ever had that? what can you advise?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I'm not sure I understand the question--are you saying that you feel like you could have learned more from the problem you worked on or that you could have learned more from doing something else rather than solving the problem?

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Secondly, it's just that many of my friends are working on projects or searching for jobs. This often diminishes my motivation to solve problems, as Codeforces consumes a significant amount of free time and I don't feel like I'm making much progress. During such moments, I'm unsure about what to do

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        If you frequently find yourself feeling this way, maybe you should just spend less time doing competitive programming? If Codeforces is coming into conflict with more immediate career obligations, you should prioritize your career and just do competitive programming as a hobby if you feel like it.

    • »
      »
      »
      15 months ago, # ^ |
      Rev. 3   Vote: I like it -13 Vote: I do not like it

      Deleted

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        Generally, AMAs are for questions on which the person hosting the AMA might have some unique perspective, not for general questions about specific problems (in general I receive too many requests for help to solve every problem that is sent to me). To ask for help with a problem, you should create your own post or ask in e.g. a competitive programming Discord group.

    • »
      »
      »
      15 months ago, # ^ |
      Rev. 3   Vote: I like it 0 Vote: I do not like it

      Thanks.That comment was at wrong place i understood

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How do you deal with FOMO, as you might find many things interesting but life is too short :{ . Or how do you strategically remove/integrate the noise.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I generally don't experience too much FOMO, for at least two reasons:

    1. I have a fairly precise sense of what I'm interested in and enjoy doing, so I'm able to fit most of the things that are important to me into my schedule.
    2. I generally don't dwell much on things I could have done but didn't, other paths I could have taken, etc unless doing so is productive (e.g. I don't spend much time thinking about alternate career paths unless I actually am considering looking for a new job).
»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I totally love your streams, it feels like you're one of us and not some alien outta this universe. Can you give some personal suggestions for me to reach expert?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Follow the advice in the original post--in particular, try to spend more time solving problems outside of contests. It looks like you've done a good job consistently participating in contests this month but haven't spent as much time working on problems outside of contests, which is equally important in improving.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Also when will you resume your streams?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Depends on my availability, but there definitely will not be weekday streams in the immediate future. My weekend schedule is also limited prior to the upcoming ICPC WF since I have practices with my team every weekend, leaving only one day a week on which I can possibly stream. From there, whether I'll stream depends on if there's a contest I participate in that day.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you have any suggestions to improve mathematical thinking? tks

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

From where to learn new/advanced topics or algorithms?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    A list of resources is provided in the original post.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What's your typing speed? It looked to me from the streaming that you type really fast

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I can score ~150wpm on typing tests, but day-to-day I'd guess I type more like 120wpm. (My brother, typing YouTuber NoThisIsJohn, has set some typing speed world records for his keyboard layout and has recorded numerous 200wpm+ typing tests!)

»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hi, Can you suggest how should I improve my problem solving speed. I am able to solve 1500-1700 but mostly I end up taking too much time to solve the problem. I think due to my slow problem solving speed I am not able to achieve good rank even after mostly solving Div2C in contests.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Speed is mostly a function of your general problem-solving ability, so the practice method in the original post is also what I'd advise if you're mainly struggling with solving problems too slowly. In particular, when you solve a problem more slowly than you'd like, you should think about the solution and try to figure out how you could have come up with the same idea more quickly.

»
15 months ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it

Hi Geothermal, thanks for such a great and helpful post!! I have practiced a lot and had given lots of contest. Considering all the sites, I have solved more than 1600 problems. But it took me so much time to reach Expert and that also I was not able to keep it for long and my ratings decreased a lot. Most of the time I am able to solve Div2 A and B but even after lot of practice and upsolving, many times I am not able to solve Div2 C. After losing so much confidence, I almost left CP. I don't know what I did wrong, was it not enough practice or not right set of questions, but now I want to continue again and improve my ratings. Can you take a look at my profile and provide some suggestions? That would be really helpful.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    From a cursory glance at your profile, it looks like when you competed more frequently two years ago, you weren't especially consistent about practicing outside of contests. You might consider solving more problems outside of contests (and following the advice in the original post).

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Thanks Geothermal for reviewing my profile and answering my questions. And yes I will start practicing outside the contest more frequently.

»
15 months ago, # |
  Vote: I like it +5 Vote: I do not like it
  1. What is your IQ (If you every took any online or offline test)
  2. Do you think IQ does make a difference, if not in absolute rating but in the rate of reaching that rating? That is do you think a higher IQ guy can reach a certain rating in a lesser time or lesser effort compared to a relatively lower IQ guy?
  3. What would you advice me by looking at my profile regarding these things: a. Contests b. Practice
  4. Finally, do you think I can become a Candidate master by next summer?
  • »
    »
    15 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    1: I have no idea. I think my parents may have had me tested when I was very young, but they haven't told me the results and I haven't asked.

    2: I'm not sure about IQ specifically and my understanding is that there are many issues with IQ as a metric. I do think that by some metric of intelligence, more intelligent people can probably improve at competitive programming more quickly, but I'm not sure how the effect of intelligence compares to things like prior math/programming background, amount of time spent practicing, etc.

    3: From your profile history, it looks like you work on large numbers of problems when you practice but aren't especially consistent about practicing (e.g. there's a two-week block in July with no problems solved on your profile). You might consider trying to practice more consistently in order to improve more quickly.

    4: It's impossible for me to say, since it depends on your background, how much time you have to practice, your innate ability, etc. There's no reason not to try, though!

»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Your contest performance looks fine to me. You might consider practicing more consistently and trying to avoid long breaks (e.g. there's a nine-day gap in your submission history from the end of last month), but otherwise you should be able to improve by following the advice in the original post. You might also consider the advice here if you find yourself struggling with math-heavy problems.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Hey Geothermal Please review my profile. Thank You

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        You might be at the point where it would be helpful to learn how to stress test--this is a good way of dealing with situations where you're repeatedly getting WA on the same test, which seems to have happened to you a few times in recent history. Other than that, your practice consistency looks good and you should be able to improve over time if you're following the advice in the original post.

        • »
          »
          »
          »
          »
          15 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Sidaksh solved 1219 problems, don't you think that it's an overkill for still being green? What about the problem's difficulty?

          • »
            »
            »
            »
            »
            »
            15 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            I don't have a great way of quickly checking the difficulty of the problems someone is working on, so unless I see e.g. someone exclusively attempting D2As I don't have a great way of determining if someone is working on problems that are too easy for them.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

First of all, I wanna thank you for doing this! I am sure everyone here in this thread appreciates it! ****

  1. What do you think about the solved problem quantity vs quality? Is it possible to solve less but harder problems to get more efficiency in terms of rating improvement in Codeforces?

  2. Afaik, BenQ spends around 30 mins of focused attempt to solve a problem and then take a look on the editorials while other reds suggest to try to attack the problem until you solve it. What's your suggested strategy for Div-2s like me?

  3. Some people say that you don't have to know more than a binary search to reach 1600. Do you agree with this statement?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    1: I think quality of practice plays a more significant role than quantity, but practice quality is not just a matter of problem difficulty (as an extreme example, I think working on 3000-level problems would be nearly useless for someone whose level is more like 1200). The more important factor is spending the time to learn from the problems you fail to solve.

    2: See the original post.

    3: In general, I don't like to answer questions of this form because there are lots of different ways to get to any given rating depending on the contests you happen to participate in, the problems you solve, etc. (As an extreme example, I think there's a pretty good chance I could reach 2400 without ever writing any named algorithms, and I might actually attempt this at some point as a challenge on my YouTube channel.)

    A better question would be to ask what algorithms someone should try to learn if they're trying to reach 1600. My response would be that it's probably a good idea for cyans to learn some basic dynamic programming and DFS/BFS, both of which come up fairly regularly around the level of problems an Expert might be expected to solve.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

thoughts on Kenkoo set for beginners? https://kenkoooo.com/atcoder/#/training

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I haven't seen or used this problem set before, so I have no opinion on it.

»
15 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I will note that having watched parts of the screencasts of Petr, ecnerwala, neal, scott_wu, tourist, and Geothermal, it was apparent they were all of freakish coding speed. Even when I think of the right algorithm in under 2-5 minutes, which is the case on a fair portion of the TopCoder Div I easy problems I've attempted, it generally takes me 3-5x more time to code it, much because there is comparatively much hesitation in terms of remembering what to do next, the name of the variable I actually have in mind. In all honesty, I feel like this is probably harder to train than the problem solving/algorithm aspect, and I would say that this is quite a significant part of competitive programming, much since speed not only directly scores one more points in some cases but also that being fast on the easier problems gives you more time to solve the harder ones.

The difference between the top people and me seems to be much more in 1) coding speed and accuracy than in 2) algorithmic problem solving (not that there isn't also significant difference in 2)). To put it in another, there is the make the right algorithmic/mathematical observation part, and then there is the be very fast and accurate with the details part.

I also make a fair share of mistakes in coding which can be quite costly in terms of time. An example of an error I made that actually erroneously brought me to conclude that idea behind algorithm that I had not checked all that carefully was wrong.

    LL lower = sum /= n;
    LL num_higher = sum % n;

https://atcoder.jp/contests/abc313/submissions/44278290 for the actual submission. (And yes, the correction should be sum / n.)

I thought that use of a variadic macro based debug template in addition to preparation of pre-written code for various algorithms and mechanical operations would decrease my coding/debugging time substantially, and while it certainly did bring down the submission time a fair bit, I would not really call it substantial either, much for the aforementioned large difference in coding speed. It was actually a TopCoder screencast of neal that much inspired me to prepare more pre-written code. To my dismay, even after using prewritten code for PartialRaceResults from https://competitiveprogramming.info/topcoder/srm/round/18868/div/1 , it still took me 18 minutes to code (7 of which were for debugging silly mistakes I made), compared to under 10 min for most red coders.

While many or most people I have talked to express a low opinion of TopCoder both problem quality and logistics/UI reasons, I still much like it for its display of times per problem per contestant, which is not available for CodeForces and AtCoder.

I have much given up on trying to improve all that much. I can probably still improve a fair bit at the algorithm part (by say solving problems which require the more advanced and obscure techniques (some of which I still have not learned), such as suffix tree and HLD, but the coding speed seems quite founded on natural talent. On this, it seems like the best people can basically take a glance at a piece of data and immediately recall it in order to do a comparison (such as expected vs actual output) or transfer over one's code, but I cannot. There was even a time when I mixed the order of arguments, yet the likes of Petr seems to be able to retrieve this kind of information with toggle to other window for no more than 1 second. Thus, I use more automated testing tools when I can but the lack of speed mostly still persists.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Interestingly for this PartialRaceResults problem, for which I noticed that Geothermal submitted in a little under 6 min, it took me about 11 min to code, copying over two components of pre-written code in the process. Afterwards, I decided to see how long it too me to copy it by typing manually, which was 3m40s, which is actually longer than the top two people took to submit during the contest. I looked at one of their solutions and saw in it a more lightweight way to perform a more or less requisite mechanical operation. I modified my solution to use that and again, I measured how long it would take me to simply type it, which was 1m50s.

    So surely, there is a fair bit of room for more gain in speed from learning more tricks for writing simpler code. I have also noticed that debugging is rather expensive. I made a few more careless mistakes coding it using the simpler means of mechanical processing and again the debugging took me almost 7 min, one of which was swapping some order specified in the problem statement and the other of which was forgetting to initialize a vector to a certain size. I realized that the latter can be avoided by developing the habit to always declare a vector with a size, even if it is to be 0.

    As for why debugging takes longer than one might crudely expect, it is probably due to my being rather slow at using intermediate debug output to locate the part of the code likely to be wrong, especially if the bug is a more subtle one. Almost certainly, time is wasted checking parts which are actually correct (this often includes multiple iterations of addition of a dbg statement following by a re-run). In the case of array out of bounds, I do use -D_GLIBCXX_DEBUG to print the index reference and size of container but even then, locating and resolving it can often take at least a minute or two. So I guess vastly reducing the number of errors made in the first place is the best way to go. This is much harder said than done though, and I wonder as to what good habits can be developed for this. People here are, of course, welcome to make a list.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

what should I do to improve my solution clicking speed and also review my rating curve.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Not sure what you mean by "solution clicking speed", but the answer is probably to follow the advice laid out in the original post and/or to try the training plan here if you struggle with mathematical thinking.

    Your contest history looks fine; I don't have any specific advice for you beyond the suggestions in the original post.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Any advice for me?

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    From the original post:

    Edit 8/17: Thanks for all the questions, everyone! Another quick update: I'm no longer going to review individual profiles because doing so is relatively time-consuming and I don't think I've had any new comments or advice to offer in a while. Instead, consider reviewing the advice at the top of this post, at this link, and in the comments on this AMA. (I'm happy to continue answering other questions as long as people have them.)

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Advice for me too pls

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    From the original post:

    Edit 8/17: Thanks for all the questions, everyone! Another quick update: I'm no longer going to review individual profiles because doing so is relatively time-consuming and I don't think I've had any new comments or advice to offer in a while. Instead, consider reviewing the advice at the top of this post, at this link, and in the comments on this AMA. (I'm happy to continue answering other questions as long as people have them.)

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I noted in a previous comment that debugging seems very expensive in terms of time expenditure. Any suggestions on how to make fewer coding errors? How to not forget edge cases?

Another coding error I have made is referring to array index as opposed to array value (which probably took like 3 minutes to debug). I guess for something like this, it might help to develop the habit of making sure that in the case of arithmetic on values the result of which will be the array index, the variables involved are actually mutually compatible.

I seem to have a somewhat deficient bug detection or warning system. There was a time when I could not actually realize until afterwards that I was actually pushing to a vector after the return statement in an anonymous function.

I could not notice the bug I made below without asking running with debug output

VD dice_probs(int num_faces, int num_rolls) {
    VD probs(num_faces*num_rolls+1);
    probs[0] = 1.0;
    for (int roll_num=0;roll_num<num_rolls;roll_num++) {
        VD probs_next(num_faces*num_rolls+1);
        for (int roll_val=1; roll_val <= num_faces; roll_val++) {
            for (int accum = 0; accum <= num_faces*roll_num; accum++) {
                probs_next[accum+roll_val] += (1.0/num_faces)*probs[accum];
            }
        }
        probs = probs_next;
    }
    return probs;
}

class FixedDiceGameDiv1 {
public:
    double getExpectation(int a_rolls, int a_sides, int b_rolls, int b_sides) {
        auto alice = dice_probs(a_sides, a_rolls);
        auto bob = dice_probs(b_sides, b_rolls);
        double total_prob = 0.0;
        double moment = 0.0;
        for (int i=0; i<=a_rolls*a_sides; i++) {
            for (int j=0; j<i; j++) {
                total_prob += bob[j]*alice[i];
                moment += i*bob[j]*alice[i];
            }
        }
        if (total_prob == 0.0) return -1;
        return moment/total_prob;
    }
};

and afterwards, it occurred to me that

Spoiler

For me at least, a hard part of CP is that there are so many ways with respect to coding detail thru which one can fail a submission. Did you have any difficulty with these types of errors? To the extent that you did, what did you do to bring down the error rate?

You mentioned stress testing and yes, I did write a script that accepts two versions of code on which to diff the outputs of randomly generated test cases. It can be my buggy version vs someone else's correct version or a fast version and slow but correct version. However, I feel like the really strong contestants would often likely be able to spot bugs for which I have to run on a test case simply by looking at the code.

I have come to note that for CP, there is the algorithm side and the coding side. Some are visibly stronger in one than in the other. Do you feel like you are substantially stronger in one of them than in the other or are you about even? Certainly, I feel like in this AMA, you have emphasized the algorithm side much more than the coding side; in my view, the two are equally important.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    I don't think it makes sense to view coming up with ideas and implementing them as fundamentally separate parts of the problem-solving process because the better you've done at thinking through your idea, the easier implementation will be. Accordingly, if you're having a hard time implementing your ideas, the issue may be that you haven't thought through them fully before starting to type your code. For more complicated problems, I often find it helpful to write out precise definitions of the variables I'm going to use, formulas for any DP transitions I'm going to write, etc.

    • »
      »
      »
      15 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I did not quite think of them as fundamentally separate parts, but two red coders I know somewhat well also seemed to speak of them as rather separate, and overall I do see them as rather different. Of course, there are the types of problems where the difficulty lies more in tricky or complex casework. In such cases, a simpler way to go about the implementation makes a significant difference. Sometimes I miss a simpler way to code it, such as when I coded a function for generation of palindromes (but maybe many of the red coders who submitted elegant implementation of that had already see that before and actually remembered it). On this note, I believe that keeping a record of implementations of various mechanical options is helpful. Even if one does not directly use the pre-written code later on, putting in a repository makes it easier to remember.

      I do not really think I have a hard time implementing my ideas. I do not really feel this way when coding. Yet, I am like 3-6x slower in submission time than people like you, on problems at the level of TopCoder Div I easy. Again, I believe much of it stems from my being bad at avoiding silly mistakes, which is quite a debugging time sink.

      Accordingly, if you're having a hard time implementing your ideas, the issue may be that you haven't thought through them fully before starting to type your code

      Yes there are times when I omit subtle necessary aspects of the logic on first attempt. When there is much complexity of detail it is difficult for me to avoid doing this. A example is how on an expected value problem, I had realized that in a certain case, there would be an offset value to be added to the result of the actual expected value computation (this problem https://community.topcoder.com/stat?c=problem_statement&pm=16039&rd=17900 ). I forgot to add the offset in the returned result, and it took me like 5 minutes to realize this. According to my records (yes, I've written a script where I can log my progress on problem with a timestamp), it took me about 6 minutes to read the question and think of approach, 20 minutes for first coding attempt, and almost 15 minutes to debug. It was another one of these idea not difficult to think of but coding was somewhat involved. For what it's worth, I post my code.

      int total_penalty(int bitwise_num, int num_bits) {
          int sum = 0;
          for (int i=0; i<num_bits; i++) {
              if (bit(bitwise_num,i)) {
                  sum += (i+1);
              }
          }
          return sum;
      }
      
      string to_binary(int n, int len)
      {
          string binary;
          for (unsigned i = (1 << len - 1); i > 0; i = i / 2) {
              binary += (n & i) ? "1" : "0";
          }
       
          return binary;
      }
      
      class EmptyTheBox {
      public:
          double minExpectedPenalty(int D, int T) {
              dbg(D,T);
              double offset = 0.0; 
              for (int val = 2*D+1; val <= T; val++) {
                  offset += val;
              }
              vector<double> dice_probs(2*D+1, 0.0);
              for (int i = 1; i <= D; i++) {
                  for (int j=1; j <= D; j++) {
                      dice_probs[i+j] += 1.0/(D*D);
                  }
              }
              int num_bits = min(2*D,T);
              int N = 1<<(num_bits);
              vector<double> dp(N, 0.0);
              VII combs(2*D+1);
              for (int bitwise_num = 0; bitwise_num < N; bitwise_num++) {
                  int sum = total_penalty(bitwise_num, num_bits);
                  // dbg(bitwise_num, sum);
                  if (sum < 2*D+1) {
                      combs[sum].push_back(bitwise_num);
                  }
              }
              dbg(dice_probs);
              dbg(combs);
              for (int bitwise_num = 1; bitwise_num < N; bitwise_num++) {
                  // total_penalty(D, bitwise_num);
                  string bitwise = to_binary(bitwise_num, num_bits);
                  dbg(bitwise);
                  for (int dice_sum = 2; dice_sum <= 2*D; dice_sum++) {
                      double lowest_penalty = total_penalty(bitwise_num, num_bits);
                      for (auto sub_bitwise: combs[dice_sum]) {
                          if ((sub_bitwise & bitwise_num) == sub_bitwise) {
                              lowest_penalty = min(lowest_penalty, dp[sub_bitwise ^ bitwise_num]);
                          }
                      }
                      dp[bitwise_num] += lowest_penalty*dice_probs[dice_sum];
                  }
              }
              return dp[N-1]+offset;
          }
      };
      

      Basically, it seems like I was slow at implementation since 1) much hesitation during coding 2) having to deal with coding complexity results in errors, they take time to debug.

      As for solving, though there is also a noticeable difference between red coders and me, I suspect it is not actually all that large. Back in 2015, I attempted over 10, maybe even 20+, TopCoder Div 1 medium problems, and modulo careless coding errors (such as int overflow) or very minor edge cases, I was able to, not considering time, solve them 90% of the time, though on average, it took me probably 2-3 hours. I have noticed that being fast at coding and the easier problems is a very big advantage because it gives you much more time to solve the harder ones and improve one's algorithmic knowledge/ability.

      I believe accuracy, via better coding habits, would be easier to improve than speed of coding. I make some errors in doing more involved algebraic manipulations too (partly for this reason, I was never all that good at inequalities). I do not really see any way to improve this other than to check one's work more periodically as an insurance policy. Sure, that takes time, but errors unnoticed end up being much more of a time sink. Much of it seems like I simply do not really have the superhuman working memory or what not to code or compute very quickly and accurately, unlike people like you.

      • »
        »
        »
        »
        15 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Realized that in the code above, I did unnecessary preprocessing in a clumsy attempt at optimization. From tourist's code, I learned how to iterate over submasks in a simple way. :)

        for (int u = t; u > 0; u = (u - 1) & t)
        
»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What do you do for living , how old are you , what do you want in life ( in career)

  • »
    »
    15 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    I'm 22, and I currently work as a research assistant to two economics professors at the University of Chicago. My long-term plans are TBD.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

do you meditate?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

where you study math and i have a lot problems of this i know math but i can t know where i use it

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why is your username Geothermal?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you listen to music when you study/do contests?

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is it okay, if I continuously practice problems rated 100-200 more than my current rating instead of upsolving contests. Because I enjoys practicing problem from problemset(i guess since their rating are known to me) and many times feel that the problem to be upsolved was too tough for me to solve without the help of editorial.

  • »
    »
    15 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is clearly your second account; note that using multiple accounts is against Codeforces' rules.

    To answer your question, each time you participate in a contest you should almost always try to solve or understand the solution to at least one problem you weren't able to figure out in-contest. Not upsolving substantially reduces the benefits of participating in contests.

»
15 months ago, # |
  Vote: I like it 0 Vote: I do not like it

how many hours do you spend sitting in front of your computer?

»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is my profile normal? I have been practicing a lot but I am not able to improve my rating what should I do?

  • »
    »
    14 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    From the original post:

    Edit 8/17: Thanks for all the questions, everyone! Another quick update: I'm no longer going to review individual profiles because doing so is relatively time-consuming and I don't think I've had any new comments or advice to offer in a while. Instead, consider reviewing the advice at the top of this post, at this link, and in the comments on this AMA. (I'm happy to continue answering other questions as long as people have them.)

»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hey I've heard about some techniques that can help improve focus and clear mental fog. These involve things like adding brain healthy foods into your diet, or meditation to boost concentration, or cutting back on social media. Have you ever given any of these methods a shot or do you do any of them at all? If yes, have you noticed any boost in your competitive programming performance because of them ? Thanks!

  • »
    »
    14 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No, I haven't consciously used any of these techniques to improve my focus.

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

you prefer participating in online contests as many as possible or participate iff you are ready and skilled up in the offline training well, bec i see your old graph, you didn't participate a lot in rated contests, why?

my question in another way, if someone do contests and solve the same letters everytime , should he stop participating for some weeks/months till he can solve offline these un-solvable letters or participate and upsolve?

  • »
    »
    9 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I took several breaks from rated contests in the past when I felt that I couldn't consistently perform well enough to maintain my current rating (and I wanted to keep my current rating out of personal pride, to put a certain ranking on job applications, etc). During these periods, I competed actively in Div. 2 rounds and on CodeChef, AtCoder, etc, but even so I think I would have progressed faster had I competed more consistently than I did, and if your goal is to improve as quickly as possible, I recommend doing as many contests as you can. (Aside from contests that were held at night/that conflicted with other obligations, I didn't skip any Div. 1 contests on my recent push from 3000ish to 3400. That said, I'm not sure I'll compete as consistently for the next few months, since I've now achieved my main goal and my practice time will soon be limited by moving, starting a new job, and other personal commitments.)

»
9 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Congrats on reaching 3400 and getting in top 10

»
9 months ago, # |
Rev. 2   Vote: I like it -8 Vote: I do not like it

Hey! I'm keen on honing my skills in data structures, particularly with trees/Graph. I've noticed that while many blogs offer practice questions starting around the 1500-1600 rating range, they quickly escalate to 2800-2900. Do you have any recommendations for resources or platforms that maintain a more consistent difficulty level, or perhaps gradually ramp up the difficulty? Any pointers would be fantastic. Thanks a bunch!

  • »
    »
    9 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Off topic quick tip for you, write your own comments and don't have chatgpt write em for you. That's how you improve your grammar and writing skills overtime. This honestly just looks cringe. "Honing", "keen", and the way this whole paragraph is worded is not human at all.

    • »
      »
      »
      9 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      It was 5 in the morning so I can't be blamed and then I have to wake up for 8 AM class believe me that's not the most pleasant hour of the day.

  • »
    »
    9 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I don't have a great sense of how well different platforms balance difficulty since I've never really focused on learning topic-by-topic. Check out usaco.guide, cses.fi/problemset, and cp-algorithms.com if you haven't already, but I haven't spent enough time looking at the problems on each of those sites to vouch for any of them as being balanced in the way you describe.

»
9 months ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it

hey! I am 25 and I am from India. I started CP 2 years ago and programming 2.5 years ago. I always loved maths from childhood but never pursued it. well, better late than never. i really really love cp. (took a commerce stream in my highschool. i don't know why lol.)

I just wanted to say, you are awesome and my inspiration.

»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Do you play chess? If you do, what kind of similarities do you observe between chess and competitive programming? Also, which one do you think is harder, GM in chess or LGM in CP.

  • »
    »
    9 months ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    I don't play chess. I think it's essentially impossible to determine which of these two achievements is harder because there isn't really a well-defined notion of what it means for achieving a certain skill level at X to be harder than achieving a different skill level at Y.

»
9 months ago, # |
  Vote: I like it -27 Vote: I do not like it

GEO!, You will not be able to answer ...

click here
»
9 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What will you do if you can't solve a problem after thinking for a long time, but you can't find the editorial anywhere (Plus no one could help you).

  • »
    »
    5 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    sometimes I try to find the problem in Virtual Judge site and I look up the submissions

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why you don't have a profile picture ?

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you view my profile and suggest me how can i improve ...?

»
5 months ago, # |
  Vote: I like it -10 Vote: I do not like it

are u still alive?

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What do you suggest me to focus on if I want to be an expert by this December???

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi,I am inspired by your fast problem-solving skills.

I want to ask what should be the approach to prove a problem efficiently furthermore, I want to ask how to present a proof more formally.

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi,I am inspired by your fast problem-solving skills.

I want to ask what should be the approach to prove a problem efficiently furthermore, I want to ask how to present a proof more formally.

Sorry for bad english.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How Should I have to practice in the contest, I usually mess up due to lack of confidence. please advise.