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

Автор MankiratAulakh, история, 6 лет назад, По-английски

Why it is so hard? Are they making this for grandmasters only?

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

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

The round is not finished yet, please don't discuss difficulties.

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

Codejam Round 1B (Div. 1)

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +94 Проголосовать: не нравится

A problem is one of the worst problems I have ever seen.

Still I am not surprised to see my rank drop by more than 500 places in a matter of few minutes... it's like always...

»
6 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +20 Проголосовать: не нравится

learnt 2 things from today's contest-
1. practicing for 1 year has only given me useless ratings, I am still at the same level(0 problems completely solved in Codejam 1B 2020 and 2021)
2. what's the point in making problems if coders can solve them? — logic behind making the problemset

edit-learnt a 3rd thing today
the only things that worked more efficiently than coder's brains were telegram and whatsapp
1 2 3 4 5

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

Yeah 1A had easier problem 1 and previous 1B also had easier problem 1 this time its too hard

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

Why didn't they write "In case there are multiple correct answers, you may output any of them" to the output-section of problem 1??

I spent an hour thinking there must be only one correct solution, and trying to figure out why I do not have the same output as sample 2, before finally noticing that the fact that you may output any solution WAS HIDDEN IN THE SAMPLE EXPLANATION?

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +116 Проголосовать: не нравится

Bruteforcing my way through B2, and still can't explain how did it pass. Btw A is the wackest problem ever.

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

I need more practice :/

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

How to get editorials? If anyone got solutions please explain

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

Me after reading A

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

spent an hour to figure out why my solution for C gived RE while using local tester provides WA.

even caught RE in this solution

this solution

still don't know what the problem

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

    I had a problem because I read in $$$p$$$ as an int, not as a long long. Maybe it's the same for you, can't tell the type from just what you posted.

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

      int P... extra LOL, thanks

    • »
      »
      »
      6 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      How did you get the judge to give you the first value? The only code I could write that didn't TLE was when I output the position first. E.g this will TLE waiting for the judge to give a value.

      code
»
6 лет назад, скрыть # |
 
Проголосовать: нравится -17 Проголосовать: не нравится

geometry sucks so I skip the first question(with rotation) and solve the other 2 questions instead.

For B we need to find a suitable bound for the answer. If it is too large than may TLE. By brute force we can know its 402.

For C, If there is a '9' then fill the top block. For second top digit if there is a >='8' then fill it. If there is no place for the top block then we need to fill the second digit with a lower value. I set it to >='7'. In my local environment it has some chance (I guess >20%?) so I Submit a few time and pass the second test case.

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

A was the worst. Wasted about an hour on C, and all ended up in TLE. In the end, solved B but it was too late. Missed by 77 ranks, bad day :(

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

Promotion is based on relative difficulty i.e. how well you do against other competitors. As long as the round offers differentiation (the problems are of varying difficulty, and the scoreboard isn't just a speedforces), it is fine since promotion is relative.

Complaining about things like problem quality is fine. Complaining about things like difficulty doesn't make sense. There were 1500 participants that solved more problems (or more quickly) than you. That wouldn't really have changed if the problems were easier, assuming differentiation still exists.

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +103 Проголосовать: не нравится

If this contest was on codeforces, it deserves something like 500 downvotes for its announcement blog.

A is totally boring code writing. B is just brute force, I even tried to ans = 10000 and still passed.

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

Problem A is quite possibly the worst CP problem ever.

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

    Definitely an exaggeration. The problem is not too bad once you relate the clock's hand movements with modular arithmetic by analyzing the fact that the hour minute moves 12 times as fast as the hour hand and the second hand moves 60 times as fast as the minute hand.

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +159 Проголосовать: не нравится

That was some really low-quality round (perhaps one of the worst GCJ I've ever seen), in my opinion.

  • P1 was just cumbersome modular arithmetic, with products of 64 bit numbers and a lot of eye-rolling;
  • P2 wouldve been a nice problem, but for the fact that $$$O(T \cdot MAX^2)$$$ boring solution passes without a problem; not to mention, probably a lot of people implemented it without proving that it works, just YOLO;
  • P3 was just atrocious.

I hope R1C/R2/R3 will be more decent.

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

    I mean, the easiest way to prove your code works in P2 is to write it and run it on all pairs $$$a, b$$$ with $$$U[1] = U[2] = \dots = U[20] = 20$$$, so I don't think there's anything wrong with implementing it without proof.

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

    Agree completely. The analysis for P2 was one of the strangest editorials I have ever read. As if they expected any participant to go through the computation to compute 402 as the EXACT bound they need to iterate up to and write it in their code, instead of just setting MAX = 10000 and sending it.

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

    I think it's a matter of taste. Personally, I would call this round quite enjoyable.

  • »
    »
    6 лет назад, скрыть # ^ |
     
    Проголосовать: нравится -30 Проголосовать: не нравится

    If you have to use products of 64 bit numbers which cannot be done in long long, it is your problem.

  • »
    »
    6 лет назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится +39 Проголосовать: не нравится

    I'm not sure what the justification for being anti-P3 is? I thought the problem is fine--the observation is fairly nice and pretty intuitive, and the implementation can be completed in a fairly clean way. In particular, both the accuracy and time bounds are not at all tight, allowing implementations that are not particularly well optimized but that are easier to write to pass. I can imagine that this problem was more frustrating for those who attempted greedy solutions rather than the intended DP, but by setting a 98\% accuracy bound on a problem where the efficient solution is very nearly tractable (about $$$3.25 \cdot 10^9$$$ states), I think the authors signaled pretty clearly that the solution would probably look like the intended DP combined with a heuristic that serves to reduce the search space.

    I also didn't find P1 as frustrating as some others did, but I should also note that multiplying numbers in a way that creates LL overflow is completely unnecessary. My solution involves dividing numbers by $$$11$$$ and $$$719$$$, modulo $$$360 \cdot 12 \cdot 10^{10}$$$, and computing the modular inverses and multiplying by them directly, as one would normally do in a modular arithmetic problem, would overflow. However, since $$$11$$$ and $$$719$$$ are fairly small numbers and the time constraints are not tight, it is sufficient to divide by $$$11$$$ by simply adding $$$360 \cdot 12 \cdot 10^{10}$$$ to our value until it is congruent to zero mod $$$11$$$. The resulting implementation is quite clean--aside from code reading the number of tests, my solution is only 24 lines, and it certainly isn't particularly optimized for length.

    (That said, as others have pointed out, P1 definitely should explicitly have stated in the output format that printing any valid answer is acceptable.)

»
6 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится +32 Проголосовать: не нравится

My code in problem C has edit distance 0 to get AC. I just need to submit it again to get it, so frustrated...

»
6 лет назад, скрыть # |
 
Проголосовать: нравится -60 Проголосовать: не нравится

I'm only candidate master and I managed to solve the first two problems and qualify with rank 646. They seemed impossible at first but I eventually found nice solutions for both of them:

Broken Clock

https://www.youtube.com/watch?v=21ADzj9dzz4

Subtransmutation

https://www.youtube.com/watch?v=p0YtxvbuRjI

I will admit that Broken Clock is harder than Subtransmutation, especially since ticks, and the hands movements aren't intuitive.

»
6 лет назад, скрыть # |
← Rev. 5  
Проголосовать: нравится -43 Проголосовать: не нравится

Why it is so hard? Are they making this for grandmasters only?

I dunno, It seems I got successfully promoted to the next stage

As you may notice I'm not exactly a grandmaster...

But yes, it is as always with such events, a lot of reading and coding. Much less fun than from codeforces rounds

»
6 лет назад, скрыть # |
 
Проголосовать: нравится -12 Проголосовать: не нравится

The results are in preview right now and the ranks are updating. My rank got increased by almost 500. This means that 500 people got caught in plagiarism check or is there something else I am missing out? TIA.

»
6 лет назад, скрыть # |
← Rev. 3  
Проголосовать: нравится -41 Проголосовать: не нравится

Funny thing

B has score 31
A has score 30

Unofficial cutoff is 31, so
31 is enough to pass to the next round (depending on timing though)
30 is not enough

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

Though I don't find this round hard, I don't find this round good. And you don't need to be grandmaster to solve 100: I'm candidate master and was able to solve everything and placed 104th with some strange feeling that I've 15 more minutes till the end of round and nothing to do. I struggled a lot with A, but both B and C have seemed very easy for me. If somehow anybody is interested in my solving of this round without any commentary: my screencast

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

Are they making this for grandmasters only?

spoiler
»
6 лет назад, скрыть # |
 
Проголосовать: нравится -20 Проголосовать: не нравится

Personally I don't find the rounds hard. P1 was simply modulo arithmetic (N==s+t mod 360x12x10^9 or sth then subtract and everything is uniquely solved, rmb permutation) and P3 was greedy 9 which I guessed by taking a nap in-contest

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

After reading problems(Specially A), I was checking the announcement blog for downvote.

It was really bad.

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +3 Проголосовать: не нравится

I am not enough qualified to talk here. but why binary search failed in second test of B. I am binary searching over the answer for both the parities seperately. and my isitpossible function looks like this.

ISITPOSSIBLE function code
»
6 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

For anyone interested, here's a link to my screencast: https://youtu.be/zvV4sjS0fBU

»
6 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I tried to upsolve A in python and faced this...

let's find the clock rotation angle for current permutation. I obtained the following formula (so we can test each permutation in O(1), idk why it's not mentioned in editorial):

x = (A * 12 - B) * inv % mod

where mod = 360 * 12 * 10 ** 10 and inv is an inverse of 11 for this mod. Naturally, I decided to precompute inv using the familiar code:

inv = pow(11, mod - 2, mod)

and guess what, this line gives an incorrect answer, apparently because of integer overflow. In python. Can someone clarify this? I would've freaked out if it was an actual contest...