Matr1xCa5cade's blog

By Matr1xCa5cade, history, 3 weeks ago, In English

Well,I have difficulty in solving constructive-algorithm problems.So how can I solve them correctly and faster?

If I get an answer,I will be very thanksful to you.

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

»
3 weeks ago, # |
  Vote: I like it +260 Vote: I do not like it

i don't want to offend you but this is so cyan

»
3 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

I asked a similar question in codeforces. Someone told me that I should solve more constructive-algorithm problems.

»
3 weeks ago, # |
  Vote: I like it +23 Vote: I do not like it

solving problem for little n's usually help also making subtasks for yourself to solve(special cases,etc) may help.

»
3 weeks ago, # |
  Vote: I like it +79 Vote: I do not like it

I have difficulty in solving greedy-algorithm problems.So how can I solve them correctly and faster?

If I get an answer,I will be very thanksful to you.

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

    That's too simple, just think what a greedy person would do to solve the problem.

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

      This person must be smart, I can't just think like smart :(

»
3 weeks ago, # |
Rev. 2   Vote: I like it +29 Vote: I do not like it

One of my favorite ways to approach any problem I have no clue about is to write a naïve (maybe even exponential) solution. I run this solution on a bunch of small inputs and this way I can see if there are any patterns that might lead to a full solution. I feel like this applies especially well to constructive and greedy problems, but it is also pretty useful for DP as well.

»
3 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

This is the only type that cannot be improved. Just wait for remaking.

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

This won't help you get better at constructive problems, but sometimes it is possible to avoid the setters' intentions and solve these problems with DP. I remember 4 such problems that really bait the contestant into thinking all kinds of constructive greedies but could be solved with DP or DP-like solutions:

»
3 weeks ago, # |
  Vote: I like it +58 Vote: I do not like it

by coding.

»
3 weeks ago, # |
  Vote: I like it -35 Vote: I do not like it

I'm surprised even masters ask this question

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it -22 Vote: I do not like it

    Experts want to know the answer to the question too :(

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it -21 Vote: I do not like it

      IGMs want to know the answer to the question too :(

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it -24 Vote: I do not like it

    Newbies want to know the answer to the question too :(

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How do you do well being slow(according to you) in solving constructive-algorithm problems ? :s

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

    Do well for other problem types and pray that you don't get a Constructiveforces. (I actually prefer constructive problems to others though)