yozaam's blog

By yozaam, history, 4 years ago, In English

This is my opinion and of course, there will be many different ways to do something so read it if you want to know what I did...

To be green we need to be very comfortable with ad-hoc problems these are problems where you don't need to use any data structures (heap,tree etc) or algorithms (dp,binary-search etc) div2A is always ad-hoc, div2B(sometimes adhoc) is also needed to be green most of the time(so if we clear A in 15 minutes, we spend the time on remaining time on B)

The problems are never the same, but the way we approach them is similar
so I recommend going through the div2A problems here blog problems list (thank you! mostafa.saad.fci) after solving half of the problems, I stopped coding them and instead just tried to reach the point where I knew exactly what I wanted to code and then read the editorial to verify

Read/See on youtube lots of code everywhere understand all editorials!!

You should be able to solve div2A problems after reading/coding all the problems from div2A in that list (around 80 of them)
&& giving every div3, educational, atcoder beginner contest, div2, codechef for few months

Some tips from me: ->Try to ignore the irrelevant information: like names of people, berland, etc
->Figure out exactly what is asked
->Get your paper and pen and draw the example cases
->Once you can solve any problem as a human, i.e. take an input and be able to get the output
->make your thought process into an algorithm
->very often it can become a single formula or few if-else statements
->later you can worry about optimization like instead of doing while(true)a-=26 until you reach your desired value, you can just do it like a-=26*(b-a)/26 by a particular value

For div2B: It is usually possible to solve these with a specific realization after drawing enough examples and then thinking of your strategy when solving these as a human
Very often B or C is a greedy algorithm find min/max, or else you need to return any of the correct solutions when you see any, you should think of the easiest examples and solutions(ignore samples sometimes) and think about how you can convert those into an algorithm (try to come up with the simplest/obvious method)

For div2B/C where it is an array and you have no idea what to do:
Try to sort the input, apply a hashmap for frequencies/positions, if it is binary string, convert it to run length encoding, eg. 0001111000111 -> (0,3),(1,4),(0,3),(1,3)
The problems where two players are playing a game -> play the game with yourself on paper

For the rest, I am yet to learn the strategies but often in the questions, it helps me to make imaginary functions that you call and implement those later, all the best :D

Full text and comments »

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

By yozaam, history, 4 years ago, In English

I know I am just a noob, I know this post doesn't help you, don't hate and troll the post, but If you have a minute to give me an honest reply

I read this blog post where he was also green, what made you continue doing it all these years, is it so rewarding?

You both became very highly rated, Hiasat Reyna and I'm writing this as a blog instead of commenting to that post, to ask all the other top coders, what they feel

Is it worth the time and effort, should I just close my eyes and spend 1000s hours over the course of the next five years practicing

If I don't do it will I wonder all my life, was it possible for me to become red, I don't know if I will regret not spending the time or spending the time

When do you start enjoying the journey, is it when you look back at your old self?

The rating graph? Color? What makes you smile along the way? Addiction?

Is the satisfaction the same, when you solve something you don't know in div2C vs in div1

I guess I am asking...

Was it worth it?

What did you'll sacrifice, how did you feel when you reached your goal?

What is the goal, color ?

Was it just like the higher you went the more you wanted, never satisfied (e.g. after master, Now I have to be an international grandmaster ... )

UPD: I guess the conclusion is, after a while, If a contest is something I look forward to, it is worth doing :)

Full text and comments »

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

By yozaam, history, 4 years ago, In English

https://www.youtube.com/playlist?list=PLJVNjyR5fxkCzGUBKvBs36kBqW9zkUl0A

First time making a solution video so i know it is not perfect

I have posted videos of my solutions for 656 and i want you to tell me how to improve these videos I want them to be quick hints for those beginners who don't know where they went wrong, thank you!

Tell me what to improve please?

yozaam

Full text and comments »

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

By yozaam, history, 4 years ago, In English

Wow!

After two months of studying and 100 leetcode questions, I decided to come to try the real deal-codeforces. It was quite the experience!

I have become so dependent on the leetcode "run code" "show diff" options that I am not able to work without it :(

I solved question A by doing a complete dry run in my notebook and then moved forward

I tried a lot of edge cases but could not solve the wrong answer error in question B, it was so close :(

And finally, I moved onto C and there I managed to get a mathematical equation on paper ( adding 1/2 then 1/3 then 1/4 ... to avg temp) but could not figure out the loops terminating condition.

Overall I am very happy about this decision and cannot wait for the next contest!

Thanks for reading :D

Full text and comments »

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