Way_Above_your_level_lol's blog

By Way_Above_your_level_lol, 5 years ago, In English

Time: 5:45pm IST

  • Solved A
  • Couldn't solve B
  • Couldn't think of C

-- Up-solve :

  • Read the question wrong for A and started swapping on all elements, should read carefully and remember A is the easiest so the probability of there being a catch is less.
  • Started on right track of taking elements on the edge of -1 valleys. Should've added them in a vector more efficiently, instead I made complex vectors which was confusing. Then I did not think of a mathematical proof instead I made a intuitive guess which was wrong. Should try to get a mathematical proof for every question!
  • Couldn't even think of going the opposite route of finding subsets of zeros. This mindset of solving something else to get something else always comes with Subset questions, I got one such previously too. Keep this in mind.

What I Learnt

  • How to get max_element and min_element directly from arrays. ( cout<< *max_element( arr.begin() , arr.end()) )
  • I wonder what is the complexity? O(N)? research ("YES")
  • Find mathematical proofs and don't get scared
  • Using pop_back() function (similar to push_back) pop_back
  • using resize() function resize
  • using substr() function, Reaaally helpful! substr

--- New Things to learn:

  • Writing LL after a integer constant makes them Long long, good for using max() functions, can I convert into any other format like float to double?
  • ANS: Yes I can, by multiplying with typecast of 1.0 . ** eg int x=5.0; x= 1.0*x; ** //now x is double
  • Maybe there is some list of questions like C. I should search for that!

  • Sparse Tables, problem E uses them, will learn and share good resources!

---- Pending :

  • Read and try E

EDIT 1: D has been solved really neat how the editorial solves the problem, not the approach but the code. Soo smooth.

----Song of the contest

Sweet Child O' mine by Guns and Roses :)

| Write comment?
»
5 years ago, # |
  Vote: I like it +37 Vote: I do not like it

although the way you are treating the contest is a proper one, you should consider that publicly announcing your efforts is not always a good idea. why won't you write a blog about strategies to perform well in contests (after some research ofc) and how to upsolve them in a good way? :)

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

    Not necessarily a good idea, but not necessarily a bad idea either.

»
5 years ago, # |
  Vote: I like it -15 Vote: I do not like it

This is a good way to track your progress, but I believe you should do it in private.

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

    also I believe that when he become a Grandmaster, you will ask him to share his progress in details not just as a way to learn.

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

      Nope, no more. I know the standard answer

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

    What? It's the most beautiful content on Codeforces, espeсially from Cyan. Anyway, much more better than this or this or this.

    P.S. Mike, make "Subscribe" button))

»
5 years ago, # |
  Vote: I like it +33 Vote: I do not like it

good job, keep going.
a small piece of a known advice: "Talk less, Do more."
hope to see you solving hard problems and writing great editorials for them.
also explaining your progress in hard problems is a lot more interesting than the easy ones, keep that in mind.

»
5 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Writing LL in front of integer constant makes them Long long

- Did you mean writing ll after constant interger?

Can I convert into any other format like float to double?

- You can convert number c to

  • float by 1.0f * c

  • double by 1.0 * c

  • long double by 1.0L * c

»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Hint: If you want to keep blogs while keeping them private, save them as drafts instead of publishing them.