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

Автор Imakf, история, 3 года назад, По-английски

Hello, Codeforces!

Daniel_yuan, waaitg, smg23333 and I are glad to invite you to Codeforces Round 706 (Div. 1) and Codeforces Round 706 (Div. 2), which will take place on Mar/10/2021 15:05 (Moscow time). Note the unusual time of the round. In both divisions, you will be given 6 problems and 2 hours to solve them all.

We would like to thank:

Score distribution will be announced before the round.

Hope you all gain positive ratings $$$\Delta$$$ in this round!

UPD1: Score distribution is

Div. 2: $$$500-1000-1500-2000-2500-3000$$$

Div. 1: $$$500-1000-1500-2000-2500-3250$$$

UPD2: Editorial

UPD3: Congratulations to the winners:

Div 1:

  1. Radewoosh
  2. maroonrk
  3. tourist
  4. Um_nik
  5. Egor

Div 2:

  1. shikaichengwoerzi
  2. grey
  3. csyakuoi
  4. sh_mug
  5. notTehlka
  • Проголосовать: нравится
  • +580
  • Проголосовать: не нравится

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

As a problem setter, I set some problems.

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

As a tester,this round is really nice,statements are short and clear and problems are interesting.

Wish you can enjoy the problems and get high rating!

Don't forget to upvote me XD

upd:Imakf why you steal the first comment >_<

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

As a tester, the statements are short and pretests are strong and give me contribution XD

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

    Not so strong pretests apparently :/

    Why doesn't B have multiple testcases (like A and C have) to check for edge cases in the pretests?

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

As a tester, the statements are short and pretests are strong and give me contribution XD

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

Another Chinese round! It's a pity that I won't be able to participate in it because of my classes :(
Anyway, I wish good luck to all participants!

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

As a tester, I want contribution!

The problems are fun and interesting, so don't forget to participate!

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

Hope you all gain positive ratings Δ in this round!

It is theoretically impossible sadly :/

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

    It's not sad . If everyone gets positive rating then it won't remain fun and competitive.

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

      You could have it both ways.

      Create rolling sum that increases after each round, add the max rank to it each time. Each rank would be than sum + actual rank. Increases every time!. And yet distances between users stay the same! :D

      Yeah I know its silly and impractical. But it is possible.

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

    What if there was only 1 participant (initially rated 0) who solved all questions during the round? What about this "theoretical possibility"?

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

As a tester, the statements are short and pretests are strong and give me contribution XD

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

As a tester, I really recommend you to check your code carefully before submitting.

(btw : it's the first time for me to test in a CodeForces round)

  • »
    »
    3 года назад, # ^ |
    Rev. 3   Проголосовать: нравится -51 Проголосовать: не нравится

    rui_er! /se

    upd: Why I got so many downvotes? I'm just a classmate of rui_er :(

  • »
    »
    3 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +47 Проголосовать: не нравится

    Well I really wonder why I got so many downvotes. Maybe you disagree with me, but this is just a kind suggestion, so please be more friendly to a person who is still a new hand but always tries his best to do every job. :(

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

    " I really recommend you to check your code carefully before submitting. "

    Well, you are right. But why you guys didn't make the pretests of B strong? I think it's easy to be done. :)

    • »
      »
      »
      3 года назад, # ^ |
      Rev. 2   Проголосовать: нравится +25 Проголосовать: не нравится

      I'm really sorry if this makes you confused, but I'm only a tester (not problem setter), so I don't know whether the pretests are strong enough. I started my virtual participation and tested some solutions and the constraints. This is the first time for me to do this job, so maybe I'm lack of experience. I'm sorry again and I'll try to work better next time. :)

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

        Thanks for your reply. It's always hard to make something perfect in the first time. And I think you will do better in next contest.

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

Are contest timings decided by problem setters?

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

    Yes. This unusual timing is because the problem setters are Chinese and they have to go to school the next day (maybe.

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

Chinese round!!! Chinese time!!! I can take part in the contest at school!!!

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

Chinese Round is coming!

Gaining positive rating $$$\Delta$$$ is not the most important thing that you got from a contest. Passing interesting problems and benefiting from them are the core purpose of participating in the contest. Otherwise, if everyone only want to increase rating, the utilitarians may fill the community.

Of course, getting high rating can be your motivation for progress. But I also wish you not go against your original intention of studying Computer Programing.

And, good luck! XD

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

    Now found someone like me who also dislikes people yelling for rating here.Followed you buddy.

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

      Why would you dislike someone for having a different motive than you?

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

        I also don't have answer to this as somethings which are felt can't be described. It is a feeeeeling. I can't describe it.

        Remember in my comment yelling is not meant as motive. motive is something different. some people just freak out on social media if they gain something. some people just cry here in the discussion when they suffer huge delta this deviates the purpose of this blog. 100 / 400 comments in every round discussion says about. "Hope I become expert/ specialist/master today!.

        "Oh shit damn due to a silly mistake I lost 150 delta".

        "OMG what a tough round".

        "WTF the pretest 2".

        This all things are fairly common in present comments in the announcement pages . And ya most popular trend.

        "As a Tester ....shit"

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

          Everything aside, you are a legend man. You are from Ukraine, study in China and have an Indian meme as your dp. XD

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

    lmfao that said from your mouth lol

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

China is an actually a good country :D

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

Wow a newbie testers

»
3 года назад, # |
Rev. 2   Проголосовать: нравится -14 Проголосовать: не нравится

Attention, time is unusual !!!

»
3 года назад, # |
Rev. 3   Проголосовать: нравится +90 Проголосовать: не нравится
Maymay
»
3 года назад, # |
  Проголосовать: нравится +117 Проголосовать: не нравится

As a tester, give me upvote!

Hope you can enjoy it. When you get stuck by one, you can just read problems after. :)

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

I saw lots of brilliant coder testing the round, maybe this means the contest won't be easy.

I want to become purple after finishing the contest(Daydreaming, of course.), so I'll try my best.

Hope everyone enjoys the fun of coding, like I do. Stay Cheeki Breeki :-)

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

What does it means- " In the upcoming round, you can use only Kotlin. You can read the code examples here."

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

As a tester, the statements are short and pretests are strong and give me contribution XD

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

This is my second time to be a problem tester.Thanks to Imakf for giving this valuable opportunity.

The problems are well-prepared with interesting stories.Hope you enjoy them.

At last,good luck and have fun and get high rating

As a tester,please give me some contribution XD

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

Aaeria

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

This is my first time to be a codeforces tester, I feel glad. Thanks to all of the writers!

This round will be very interesting.

Wish everyone good luck!

(The statements are short and pretests are strong and give me contribution XD)

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

Colorful testers :D

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

Imagine getting + delta in a div1 as a low purple

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

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

An Orange-blue Round XD.

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

Feels great to see newbie in testers :)

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

As a grey colour, I'll solve A and attempt to solve B.

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

As a problem solver, I want some contribution, too. XD

»
3 года назад, # |
Rev. 2   Проголосовать: нравится -59 Проголосовать: не нравится

The start time is too early. Sad, Chinese Round should be destroyed.

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

Good luck to everyone!!!

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

As a problem solver, I want some contribution, too. XD

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

May we know number of common problems between divisions?

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

As a resident of UTC+7 please give me more chinese rounds

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

As a contestant didn't do anything I want some contribution

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

At long there is a game whose time is suitable for me.

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

It will be evening in India and will be missing playing footbal.. Hope I give it my all and make it worthwhile

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

What mean rejected problems? see about it in almost all contest announcements. Why everybody write about it?

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

    coordinator can reject problem, and it is often case if you are new in problemsetting

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

When you know you are going to lose rating, but still want to participate (Chinese round fact)

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

After reading prob D(lets go hiking)- others — Try to solve the problem. me — lets leave this and starts searching for hiking destinations to visit post Covid.

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

I fucking hate double in problem C I have right algorithm and because of double it doesn't accept on first pretest

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

No one tester noticed that statement of div1B is confusing? Really? I lost 0.5 hour and made 2 excess submissions because of that, and I am angry now

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

How to solve B ?
And what's wrong with this solution ?? WA

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

    if mex is equal to n then ans is n+k otherwise answer can atmost be increased by 1.

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

    Your method for calculating mex only works for sorted array.

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

    Your logic for finding the mex is not correct because the input is not necessarily in sorted order. For example, if the input was 1 2 0, then the mex you find is 1. But the correct mex for this input is 3. Try applying the same logic while iterating over the sorted set of elements after you have inserted every element into the set.

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

I think Problem C should not be in the position of C...

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

What is in the 3rd pretest in div1C?

btw, div1B is elegant imo :)

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

I think 1B should have highlighted the fact the two inequality signs are different for the two people's possible moves. Also I should learn to read better :(.

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

Can Any one tell why i am getting TLE? I am just using sort and sqrt functions This is my submission:https://codeforces.com/contest/1496/submission/109622532

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

    multiset are very slow (something like 20 time slower than a sort), try with arrays of size n and counters to know where to add, or with vectors it should pass

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

Whats the approach for Div2 D. I am getting WA on pretest 9.

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

Div 1 D has such a scary time limit. I spent a bunch of time doubting if $$$\mathcal{O}(n^2 m)$$$ would pass, and it turns out my $$$\mathcal{O}(n^2 m)$$$ passed pretests in 2.13s/2.5s. It doesn't have any optimisations, so the runtime should be fairly independent of the input, but still, I'm scared of the systests.

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

anybody who can explain what's the deal with using Fast io and setprecision together resulting in TLE for C ??

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

I think the differentiation of problem C is TOO low.

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

[Div1 B] Am I the only one to not notice that the conditions for x and y are opposite and made 3 WA submissions?

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

what's with the 4th pretest of div2 c?

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

    Just don't take the container in which you are storing miners and mines of long double type, take it of int type. And rather take miner[i]*miner[i] + mine[i]*mine[i] as a long double variable to pass to sqrt function. And it passed for me after a number of Time Limit errors. Edit : also sqrtl() in place of sqrt()

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

Can anyone explain their approach for Problem C ? Thanx in advance .

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

How to D?

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

    I am not sure if this correct approach , I think answer will be always $$$1$$$ or $$$0$$$ .Answer will be $$$1$$$ only when there exist some index $$$i$$$ such that array is decreasing in both right and left direction of index $$$i$$$ and size of the maximum decreasing sub array in both directions are equal,even and maximum in the whole array.

    Update this approach is correct : 109629126

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

    Rewrite input as mountain profile. Then first player only go down, and second player only go up. The players can't collide. First player should always start on peak. Otherwise, if he is in hole, he can't do any move, if he is on slope, second player can start under first player. Find for every peak its length to the left and to the right. If there are two peaks with same maximum length to the left/right, then first player always lose. Assume he starts on one peak, then second player will start on bottom of another peak, and since he is second, when they walk same distance, the first player will must do move. Now, we have the only peak with its length to left and right. This is the only position, where first player has chance to win. So the answer is either 0 or 1. First player wins if and only if the lengths of peak are equal in both sides and even.

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

In, div2 C, using a vector of double caused TLE, while a vector of long long passed the pretests :(

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

I misread statement from problem B and I thought that both players could make the same movements (I didn't see that $$$p_{y'} > p_{y}$$$). Goodbye div1 :(

I'm really surprised that all my submissions reached pretest 7.

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

When you read Div 2. D as py′<py and spend 1 hour solving the wrong problem ://

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

    That is bad problem statement. I did read it like 25 times before noticing.

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

    Providing the explanation in problem D before hand would have saved a lot of time and maybe that could have been utilized in writing better solution.

  • »
    »
    3 года назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    I was still solving it for the same until I saw your comment. Still getting a positive delta but could have done better.

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

What was Div1B Pretest 7?

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

Div.2 E / Div.1 C has elegant solution, just think about a pattern.

Spoiler

Upd. Managed to construct a solution which uses regexes (Perl): 109637022

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

Can someone explain why I got TLE in D2C? :((((

https://codeforces.com/contest/1496/submission/109611221

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

    use long long int instead of long double, the sort will be faster (I know it's weird)

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

Why my code is wrong in Div2C?

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

    firstly the value you set ans to is too low, it can be up to 2 10^13, define it by the first value and it should become correct (to my mind). However, according to others bad experience, you should use vector of long long int and not long double because elsewise sort will be too slow on test 4

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

In recent contests I spent most of the time in asking myself, "How could I missunderstood the problem statement so that my solution does not work?"

Of course it is not allways the reason for WA, but if something does not work as expected, than usually such missunderstanding is the reason.

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

Would've really appreciated if the sample explanation for B were added beforehand. Thought the p’ > p signs were same for both players and solved for that. I take full blame for my mistake, but would've been nicer if at least one simple simulation were shown in notes, just sucks to lose so much time on a misread. Gotta be more careful I guess

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

The FST rate of div1B looks so scary...I am so curious about the pitfalls...

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

Why is this solution giving TLE for 1496C?

Question Link: 1496C Submission Link: 109603686

The solution is under the constraints and the approach and method is same as most of the accepted solutions that I have seen. Why is my particular solution giving TLE?

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

    dont use long double in vector

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

      Okay, using long long in vector worked, but why? Both long double and double give TLE, why? I have seen accepted answers using double in vector?

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

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

Please tell whats wrong with these solutions ?? (Today's div2-c)
Link1
Link2
I was at ~200 position after solving 2nd problem then there comes this problem :(.

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

    Use vector long long vect1,vect2 rather than long double vect1,vect2. I had the same problem made 8 submissions before making the right change. Sorting is O(nlogn) but there is considerable overhead sorting long doubles than integers. Stupid C++ :)

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

Problem statement for this problem "Let's Go Hiking" was very fuzzy. It could have been more clear with test case explanation.

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

I think the number of pretests of Div2D/1B are too few...

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

Damn D's are failing fast.

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

I can't understand why I have got TLE for problem C in Div.2 for this solution: https://codeforces.com/problemset/submission/1496/109589906

but OK for this solution: https://codeforces.com/problemset/submission/1496/109596686

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

how to solve D div1 ?

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

    A solution should be available on the editorial, but here's an outline of my thought process.

    Precompute the pairwise distances between all nodes. Then, we'll compute the answer separately for each pair of nodes.

    The key observation is that a pair of nodes has answer zero if there are multiple shortest paths between them. We can prove that any edge on a shortest path from i to j must be in a BFS tree that can be rooted at both i and j, and if multiple shortest paths exist, this will necessarily create a cycle.

    The shortest path from i to j is unique if, for every d from 0 to dist[i][j], there exists a single node k such that dist[i][k] = d and dist[k][j] = dist[i][j] — d. We can check this criterion in O(n).

    Then, the BFS tree becomes a forest containing a tree rooted at each node on the shortest path from i to j. We can then show that vertex k not on the shortest path such that dist[i][k] = a and dist[j][k] = b must be connected to a parent vertex p satisfying dist[i][p] = a-1 and dist[j][p] = b-1. Therefore, we can compute the answer by multiplying together the number of possible parents for each vertex.

    We can thus deal with each pair of vertices in $$$O(n+m)$$$ time, so the total complexity is $$$O(n^2(n+m)).$$$

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

Thanks for this round!!! :>

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

There is a huge difference of who solved A,B,C and who solved A,B,C. :(

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

Hey could anyone explain when using long double rather than long long, its giving TLE on div2C?(https://codeforces.com/contest/1496/submission/109596148) (https://codeforces.com/contest/1496/submission/109613452) I know sorting has considerable overloads for long double but still wouldnt the complexity still be O(N*64*LOG(N*64))?

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

Solution for Div.1 C : Consider partitioning about columns, that is mark complete columns as empty for columns 1, 4, 7 .... in 1 based indexing. Now between each 2 consecutive columns, if there is at least 1 cell that was originally empty, eg. in column 2 and 3 while considering columns 1 and 4, join both the columns using that row's elements in between them. Otherwise join them by the first row if no such empty cells exist. Finally if the number of columns are divisible by 3, we have to join the last column elements to the rest of the elements joined till now. To do that, for each such original empty cell in the last column, mark it's previous column (same row) element as empty.

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

Again, not good presets XD

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
»
3 года назад, # |
Rev. 2   Проголосовать: нравится -9 Проголосовать: не нравится

Why is Problem E easier than D —— even Problem B?

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

:D finally fst on 1B, because of some small bugs.

But it's still a nice trip, isn't it?

In the end, my rank reduced by 60. Luckily I still become an IGM, with various motions in my heart.

It's an exciting and unforgettable day for me, although this round maybe my last time to participate in a codeforces round.

It's time for me to stop studying Computer Programing, because of too many hard competitions and the stress of studying subjects. Otherwise I must try my best to become a top OIer in China, it's too hard for me ...

Wish you all good luck! And, thanks. :D

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

My code is printing 1 on my pc and ideone but on codeforces its printing 0.

Whats wrong?

mentioning: MikeMirzayanov

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

For div.2 C problem. Can someone tell me why is 109605593 getting TLE and 109609603 getting accepted when both are having the same logic?

Just printf statement is different. %.15f in one while %.15lf in second.

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

"strong" pretests for B. I think that there aren't too many situations but the pretests didn't include those. Anyway, you should consider all the possible situations. :(

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

Pretests for problem D were very weak!! I mean look at the 30th case and 20th test case, how can one not include it in the pretests? Anyway it didn't affect my ratings but still those got WA on those test cases are unlucky :(

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

With many participants happened this: one of the solutions got TLE, the other one got OK, but they have the same logic (problem Div.2-C).

Why??

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

Thanks for the round! I thought the problems were very high-quality, and I enjoyed thinking through them for a few hours. (This was probably the most intense CF round I've ever taken--finishing C and solving D in the last ten minutes saved me on the order of 150 rating.)

One point of criticism: I'm not entirely sure why B did not use multitesting. There's no particular reason it would have been more annoying to write up if multiple test cases were included in each input, and this sort of problem (i.e., problems with only a handful of possible answers where determining which one is correct relies on checking some fixed criteria) always seem to lead some competitors to janky solutions that break down on relatively rare edge cases. The resulting FSTs would have been avoidable if multitesting was employed: for example, many solutions FSTed on a case with $$$n = 5$$$, and this could easily be prevented by a single batch test containing all inputs from $$$n = 2$$$ to $$$n = 7.$$$

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

Because of the pretest of div2D/div1B , lots of people are disappointed.

But you should consider all the details.

If you can't consider all the details , please improve yourself , do not blame the problem.

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

how weak 2D's pretests are!

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

Proof of Problem C that we should not have intersecting lines in the midway somewhere.
1615388314211

EDIT : D22 — D12 should be in the next equation. I hope you all can understand it. Please tell me in the comments if you have any issue in this. Also i missed to write +k when simplifying D22.

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

Nice contest, but author of problem F should learn the difference between a circle and a square.

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

Problem C

Can anyone proof it to me.

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

Less participation = -vve rating

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

As a tester of some past contests, did the testers who say "pretests are strong" really check the pretests? I sometimes checked the (sys.) test during testing, but I never see the tasks on Polygon(because almost always testers don't access or don't have READ rights on there) during testing and then I couldn't check which tests are included in the PT.

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

    This is a problem.. It seems like testers nowadays are just spamming "Statements are short and pretests are strong" to get contribution. Logically not every round they test can be that perfect, yet I see these comments on every round.

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

В русской версии условия Div2A опечатка в пояснении к примерам. Написано, что пояснение ко второму примеру, хотя оно к третьему

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

Can anyone tell me why this doesn't work for problem B? I think my idea is correct.

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

    There is something called "Time Complexity". Learn it first...

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

      Ok, I don't know much about time complexity, but my code gives me wrong output, not TLE.

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

    i think change

     ans = int(math.ceil(max_ + res) / 2)
    

    to

     ans = int(math.ceil((max_ + res) / 2))
    
    • »
      »
      »
      3 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Thank you, but it gives me exactly same output as before. On first test case: 4 4 3 3 3

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

        I checked your code and found two problems. First mex_ can be from 0 to n but your code check 0 to n — 1 change

            mex_ = [int(i) for i in range(n) if i not in a]
        

        to

            mex_ = [int(i) for i in range(n + 1) if i not in a]
        

        Second when append new value recompute max and mex value. Because it can change. But your code only compute once.

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

In the rating predictor why less positive delta is showing? On what factors rating changes are dependent upon?

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

D is good and my clean implementation below.

109642740

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

submission 1: https://codeforces.com/contest/1496/submission/109647192 submission 2: https://codeforces.com/contest/1496/submission/109645519 can someone tell me why the first code is accepted and the second code is giving TLE ???

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

Hi guys. Something really strange happened to me.

Today I attended cf round #706. For some reason, it gave me this warning. During the contest, I resubmitted once and changed the "int" to "ll." Now im not so sure why it gave me this warning? Is there anything wrong with resubmitting the exact same solution of mine? I think there may be an issue with the system or something. Currently, my submissions are "skipped" for this recent contest: but I still don't see the fault of re submitting. Could you please take a look at this @MikeMirzayanov. If someone could help me fix this issue, that would be great. Thank you.

Upd: for further evidence, I received 2 messages from the "system," which means that I "copied the code from my own code."

»
3 года назад, # |
Rev. 2   Проголосовать: нравится -14 Проголосовать: не нравится

?

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

FSTForces

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

In Div 1 E's sample,

I know 114514, 1919810 are famous (unhealthy) slangs for Japanese, and 2333.. is a slang for Chinese.

But I don't find the meaning of 19260817, 623532, 7175. Do they have special meanings?

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

In first line, I read "Daniel_yuan waiting" :p

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

May we know number of common problems between divisions?