Le_Gusto's blog

By Le_Gusto, history, 8 months ago, In English

After 2 months of hard practice, I finally managed to climb from gray to specialist! I knew this moment would come soon, but I didn't expect to perform so well out of the blue — I unexpectedly took 721st place in todays Div. 2. Overall, I feel like I'm making big steps and rapidly learning — I used to get stuck on Div. 2 A and B before, sometimes even failing to solve B, but now I'm able to solve A-D. It's starting to get easier to notice patterns and break down problems to solve them with already known algorithms. I'm looking forward to seeing how far I can go!

I would say 'til the next contest, but I probably won't post until I reach expert. So, hopefully I'll write again soon!

Full text and comments »

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

By Le_Gusto, history, 9 months ago, In English

Hey,

It's been a while since I last made a blog, mostly due to university really ramping up the intensity and having to move into a new place. I couldn't make it to a bunch of rounds due to mandatory practicals or had to be late and lost rating, but I have finally managed to break past gray rank.

In general, this round went really smoothly for me. It felt like all the solutions to the questions from A-D came naturally, and I was able to implement them quickly after working through the problems for a few minutes. Although for A, I tried to come up with some efficient algorithm at first, but then I realized that it's the first problem of a div. 3 and just bruteforced it. I had around an hour and a half to solve any of the problems E-G, however, it didn't go too well. For E, I thought that it's most likely DP and sliding window for finding the correct rows, but I couldn't think of any way to implement it, as you would have to consider at most 2*10^5 cases for each recursive step, which seemed way too slow, so after a good while, I just gave up and moved to the next question. For question F, I misread the problem statement and just skipped it, cause I thought it was way too difficult, which was a big mistake, since F was probably the easiest to figure out of the three. Lastly, I attempted G, however, I made a very slow algorithm without grouping, so it had no chance at passing the tests. Moreover, for some reason I was having a lot of issues with vectors and arrays, as they seemingly sometimes would return incorrect data, so I spent a good chunk of time just trying to get the program to run correctly on the test case, until I settled on just making global arrays and filling them with -1 after each test case. I felt a bit disappointed that I couldn't solve any of the three, but in the end, I went through A-D quickly, so I was still happy regardless.

All in all, I can definitely see myself improving over time after participating in the contests. I can find solutions to problems faster than before and I'm able to consistently solve Div 2 A-B in the first hour. It feels like a big step to finally break through 1200 rating, because it seemed impossible at first, but after a lot of practice, it has finally been done. I'm looking forward to reaching cyan in the near future and then working my way towards expert.

Lastly, one final note about the previous AtCoder Regular contest on Sunday: I was expecting something like div. 2 from CF, but I couldn't solve even one problem. I looked at the standings, and only around 30% of people solved at least one problem, so 70% of all participants got 0 score. After looking at the editorials, the solution for A seemed not intuitive at all — I don't get how you were supposed to see that you need binary search for problem A. The contest just felt like 2 hours of banging my head against a wall, seemingly getting closer to the solution, but in the end, going in the wrong direction. I'm probably just way too low level for the regular contests. But hey, at least I tried it.

Well then, 'til the next contest!

Full text and comments »

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

By Le_Gusto, history, 10 months ago, In English

After a very stressful week in uni preparing for tests on complex topics, I could finally relax and do some Codeforces again.

Honestly, I feel like I have definitively improved — by applying what I learned on priority queues from Leetcode, I could solve B faster than usual, leaving more than one and a half hours for problem C. For problem C, although I didn't manage to finish the solution, I was very sure that I was really close to the answer. I was stuck for a while trying to find a testcase on which my attempts got stuck, which I only found with around 20 minutes left. In the last 20 minutes, I was scrambling to fix the testcase asap, but I got lost in my thoughts while rushing through everything, until eventually getting mixed up in what I'm even doing. Despite only solving two problems, I think this round went great for me and showed that I am making some kind of progress. I also noticed that if I take my time to try out solutions on paper for a few more minutes instead of rushing to write the code for it, I can stop myself from wasting a lot of time writing bad algorithms, overall resulting in faster accepted answers. Hopefully, I can solve C in the next Div. 2 — I feel like I can almost do it now.

There's only a week left until March, so I must step up my game if I want to reach 1200 by then. I will try to grind as many problems as possible to maximize my chances of reaching 1200 in time, but if I don't, I'll just keep trying next month.

'til the next contest!

Full text and comments »

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

By Le_Gusto, history, 10 months ago, In English

After a busy weekend rowing abroad, it was finally time to get back to coding. By skipping one of my lectures on heaps, I managed to make it back home and join the contest only 20 minutes late, ready to solve some easy problems.

The contest went way worse than I expected — I only solved A and B. It might just be coping, but I think problems C and D were too difficult for Div. 4 — they felt Div. 3 level at the very least. I spent a good while trying to find some patterns on C, but couldn't manage to put together a solution. For problem D, I didn't notice very important key details and spent considerable time researching how to use bitsets, but even after I figured out how to read the bits of numbers, the solution I had didn't work and would probably have been too slow anyway. While doing problem E, I made a mistake when I came up with my algorithm to solve it, which turned out to be a major flaw that made the whole algorithm useless. It's a bit sad that I will most likely drop down below 1k, but I'll just climb back up.

I think that I'll do some problems on Leetcode involving bits to better prepare for questions like D. I'll also check out the editorials and try to find how I could come up with solutions for C and E once they get published.

'til the next contest!

Full text and comments »

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

By Le_Gusto, history, 10 months ago, In English

After solving Leetcode all day long on Valentine's day ( :( ), it was finally time to test what I learned.

Unfortunately, I wasn't able to help Sasha ask out his crush. In fact, the farthest I got was solving problem A, which took barely any time, but then none of my solutions worked for B and C. I honestly have no idea what went wrong with problem B (Sasha and the Drawing) — I couldn't pass the second pretest, so I started sketching many squares, from 8x8 to 2x2, and looked for any patterns I missed, but it seemed like the program worked correctly for any testcase I could think of. I was pretty bummed out after sketching for around an hour and still failing pretest 2, so I decided to try problem C (Sasha and the Casino). I noticed that there was something going on with the sum of all previous coins and reached the conclusion that each winning bet has to make more than all the previous losses and the current bet combined, but the algorithm I came up with was too slow. I tried making it faster by calculating how many times Sasha will bet the same number of coins before the winnings become too small, but I couldn't get it to work correctly on bigger test cases. In the end, I was left with only one problem solved, which kinda sucks, but at least I know what I need to work at.

Overall, I felt like the contest was alright — the theme was nice and it didn't feel like I couldn't solve the questions because they were confusing or anything. I think I have a big hole in math/combinatorics problems, because it seems like the answers for lower rated problems that I can't solve usually don't involve hard algorithms, just some detail that I couldn't find. Maybe it might be a good idea to check out higher difficulty questions too during contests, cause I know a couple of graph algorithms and some DP. I'll be looking forward to the editorial though.

'til the next contest!

Full text and comments »

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

By Le_Gusto, history, 10 months ago, In English

Just finished my first contest after almost a year of no codeforces contests. Overall, I felt like it went pretty alright, although I only managed to solve the first three problems. On problem 4 (Divisible pairs), I got completely stuck for a long time, before finding a solution on the very last minute of the contest, which turned out to be too slow. I find that this scenario happens fairly often: usually I solve two or three problems, which don't take too much time, but then some other problem will stump me and all solutions I come up with either don't work because of some test cases that I didn't think of or it's just too slow. Looking forward to looking at the solution for it though — I had a suspicion it might involve two pointers from the moment I saw the problem, but I couldn't find any way to implement it.

There's only one conclusion that can be drawn from this — I need to practice more.

Well then, 'til the next contest!

Full text and comments »

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

By Le_Gusto, history, 10 months ago, In English
  • Vote: I like it
  • 0
  • Vote: I do not like it