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

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

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

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

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

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? :)

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

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

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

    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.

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

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

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

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.

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

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

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

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