Блог пользователя yozaam

Автор yozaam, история, 4 года назад, По-английски

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

  • Проголосовать: нравится
  • -28
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

Step by Step guide on how you can be a blue coder, for experts.

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I wonder how can a pupil become a green coder, atleast think before you post

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

i am newbie, i wont follow ur advice

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

I think it is just simple

solving problem which difficulty is above your rating

»
4 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

It would be hilarious if you fall to green in your next contest :D No offence

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

You are doing lots of things wrong.

1)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

Mistake: If you find the problems too easy, then increase the rating of the problems. If the problems is around or a bit higher your rating, then you should implement it as implementation really helps in general and especially new people need to train their implementation skills.

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

Mistake: Do not read editorial of problems that are a lot higher than your rating(very hard for you). You usually end with nothing and de-motivated.

3)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

Mistake: Everything. I assume you are trolling here.

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

Auto comment: topic has been updated by yozaam (previous revision, new revision, compare).