cry's blog

By cry, 13 days ago, In English

Judge Code will be added after hacking phase.

1996A - Legs

Problem Credits: cry
Analysis: cry

Solution

1996B - Scale

Problem Credits: sum
Analysis: cry

Solution

1996C - Sort

Problem Credits: cry
Analysis: cry

Solution

1996D - Fun

Problem Credits: sum
Analysis: cry

Solution

1996E - Decode

Problem Credits: cry
Analysis: cry

Solution

1996F - Bomb

Problem Credits: sum
Analysis: cry

Solution

1996G - Penacony

Problem Credits: cry
Analysis: cry, awesomeguy856

Solution - Segment Tree
Solution - XOR Hashing (by awesomeguy856)
  • Vote: I like it
  • +24
  • Vote: I do not like it

»
2 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

cry orz

»
2 hours ago, # |
  Vote: I like it +19 Vote: I do not like it

Couldn't solve D. RIP my brute force skill.

»
116 minutes ago, # |
  Vote: I like it +5 Vote: I do not like it
»
113 minutes ago, # |
  Vote: I like it +4 Vote: I do not like it

After reading problem F You realize that nuclear bombs take so much time to bomb!

  • »
    »
    103 minutes ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    sadly this is not the case in palestine!

»
112 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

G reminds me of this JOISC problem

»
109 minutes ago, # |
Rev. 2   Vote: I like it +2 Vote: I do not like it

In problem F: We are searching for the largest x such that f(x)≤k

Won't we reach infinity by doing that?

»
107 minutes ago, # |
Rev. 5   Vote: I like it +2 Vote: I do not like it

My solution for problem F:

let's find the minimum number X, where X is the smallest number that all numbers in array a can be less or equal than using at most k operations.

then, you calculate the answer for making all the numbers in a less than X, and maintain values k and a[i] for each i.

After all you will be left with k operations, so you add to the answer : number_in_a_equal_X * k

link to my solution

  • »
    »
    81 minute(s) ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    isn't that the same solution as mentioned in the editorial?

    oh, ohk i get it, you sped up the last part of solution by doing number_in_a_equal_X * k. That's good.

»
93 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

Amazing xor-hashing solution for G, love it!

»
92 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

great contest, really fun problems. i wish i managed to solve E on time as well but oh well

»
78 minutes ago, # |
  Vote: I like it +1 Vote: I do not like it

Can anybody tell why this solution for C is getting MLE?

Submission

  • »
    »
    72 minutes ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    You use map. Try replacing it with arrays and you'll be fine.

»
71 minute(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

please can anyone explain why my code works or if it can get hacked please hack it : ), i will be so happy (https://codeforces.com/contest/1996/submission/272827778)

  • »
    »
    62 minutes ago, # ^ |
    Rev. 2   Vote: I like it +1 Vote: I do not like it

    I think it can't be hacked because worst case I found O(2 * 10^9) , and it's fast enough for your code to pass because the operations sums and multiply aren't that heavy.

»
68 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

Can anyone explain how this code works? I don't understand it. Also, can you provide some sources that explain how it works? Thanks! 272756177

»
60 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

cry sum Is there a penalty on unsuccessful hacking attempt?

»
31 minute(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

Thank you for the editorial ! There is just a little typo in the explanation of problem E. You wrote in the line before the last one $$$(x+1) \cdot ((n-y_1+1) + (n-y_2+2) + ... + (n-y_k+1))$$$. It shouldn't be $$$n-y_2+2$$$ but $$$n-y_2+1$$$