When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

Tlatoani's blog

By Tlatoani, 4 years ago, In English

Hi!

On Aug/16/2020 17:35 (Moscow time) we will host Codeforces Global Round 10.

This is the fourth round of a 2020 series of Codeforces Global Rounds. The rounds are open and rated for everybody.

The prizes for this round are as follows:

  • The top 30 participants get a t-shirt.
  • 20 t-shirts are randomly distributed among those with ranks between 31 and 500, inclusive.

The prizes for the 6-round series in 2020 are as follows:

  • In each round, the top 100 participants get points according to this table.
  • The final result for each participant is equal to the sum of the points they got in the four rounds where they placed the highest.
  • The top 30 participants over all series get sweatshirts and place certificates.

Thanks to XTX for supporting the global rounds initiative in 2020!

The problems in this round were prepared by KLPP, zscoder, qlf9, golions, MagentaCobra, and me. We would like to give a huge thanks to the following people:

We had a lot of testers as the problemset of the round changed significantly throughout testing! As a result of the huge amount of feedback, we think that we've managed to make the round really high quality and hope that you'll enjoy it :)

You will be given 3 hours to solve 9 problems. The score distribution will be announced at some point in time before the contest starts. Good luck!

UPD: Score distribution:

500 — 750 — 1000 — 1500 — 2000 — 2500 — 3000 — 3500 — 4000

UPD: Editorial

UPD: System tests have finished. We hope you liked the problems! We apologize for the weak pretests on A and B — that was a major oversight on our part. Hopefully you were still able to enjoy the contest regardless :)

Congratulations to the winners!

  1. boboniu
  2. maroonrk
  3. ecnerwala
  4. tourist
  5. Petr
  6. ksun48
  7. tmwilliamlin168
  8. sunset
  9. whzzt
  10. hos.lyric
Announcement of Codeforces Global Round 10
  • Vote: I like it
  • +1170
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Tlatoani (previous revision, new revision, compare).

»
4 years ago, # |
  Vote: I like it +88 Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +132 Vote: I do not like it

As a problem writer, I really hope this round is truly rated for everybody

»
4 years ago, # |
  Vote: I like it +368 Vote: I do not like it

I tested this against my will. I demand financial compensation.

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

    I wrote this contest against my will. I demand therapy sessions paid for by antontrygubO_o

  • »
    »
    4 years ago, # ^ |
    Rev. 3   Vote: I like it +112 Vote: I do not like it

    +1.
    I demand my pending 2 cf t-shirts. I'm waiting for them for the last 3-6 months.

    Spoiler

    Still waiting for this random top 500 T-shirt.

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

      one question comes to my mind everytime I see these waiting memes:

      Who the hell steals clothes from the dead body and leave it naked??

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

        The world is very bad outside, be inside and save your clothes as well :P

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

      'Notorious coincidence indeed'

      are you trying to say that the problems are going to be stolen from round 655? o_O

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

      You don't have dick?

»
4 years ago, # |
  Vote: I like it +164 Vote: I do not like it

As a tester, I regretted that I can't participate this as an official contest...! The tasks are very interesting, glhf!

»
4 years ago, # |
  Vote: I like it +73 Vote: I do not like it

As a tester, i like the contest.

»
4 years ago, # |
  Vote: I like it +230 Vote: I do not like it

As a tester, I tested it when it was a div.2 :))

»
4 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Is there any specific reason to give a 3 hour contest as it rarely happens :P

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it -23 Vote: I do not like it

    Usually a div 2 contest has 6 problems and is for 2 hours, a ratio of 1/3 hours per problem. This one has 9 problems, therefore to maintain the 1/3 hours per problem ratio, contest needs to be 3 hours long.

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

      What us div2 people going to do for the rest of 2 hours watch the standings :XD

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

        Celebrate pretests passed before we face the wrath of Wrong answer on test 11

»
4 years ago, # |
  Vote: I like it +25 Vote: I do not like it

You are missing unrated tester :D

»
4 years ago, # |
  Vote: I like it +113 Vote: I do not like it

As a writer, I recommend you to read all problems :)

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

    last time I read such comment from writer/tester, I lost 170+ rating :)

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

      last time I read such comment from writer/tester, I gained 132+ rating :)

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

Goodjob!

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How many did he reject XD ?

»
4 years ago, # |
  Vote: I like it +20 Vote: I do not like it

Colorful testers!

»
4 years ago, # |
  Vote: I like it +8 Vote: I do not like it

So many testers?!!

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

    You mean hostages

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

      Really? I think being a tester is a great feeling!

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

        Many of us tested because it was div2. Then it became a global round, so we lost the opportunity to participate in a rated contest.

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

      At that time, we tested only 4 current problems and now we can't participate rated.

»
4 years ago, # |
  Vote: I like it +121 Vote: I do not like it

(-__-)
Bernie-I-Am-Once-Again-Asking-For-Your-Support-1

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

    Just approach any problem writer,too simple!

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

      Really?? You got the testing opportunity by approaching the problem setters??
      Also, how will I know who's gonna host a contest in the coming months? What did you do? How did you know they'll be hosting a round?

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

    I would say that you have to know some of the problem setters to have a chance of being invited , since there's a lot of information that has to be kept confidential.

»
4 years ago, # |
  Vote: I like it +85 Vote: I do not like it

[Your text to link here...](

)
»
4 years ago, # |
  Vote: I like it +27 Vote: I do not like it

As a tester i would like to say that the problems are really interesting and you all should enjoy participating in this!!!

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

    I was thinking about skipping this round as I have an exam the day after this round but your comment made me ignore the idea :D

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

We seen many specialist testers in the last few contests and now, we got a newbie too.

»
4 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Nice to see authors from all round the world tester from all colors.

»
4 years ago, # |
Rev. 2   Vote: I like it +19 Vote: I do not like it

Do longer contests cause bigger rating changes (on average)? It would make sense to me that in a 3 hours contest rating changes 1.5 times as much as in a 2 hours contest.

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

    How high were you when you wrote this?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -16 Vote: I do not like it

    The average rating change after every contest should be theoretically zero.In reality, recently the average rating changes have been a small negative value. If you want to check the average rating change of any contest,use this code

    Code Author : farmersrice

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

      The fact that the rating change should be close to zero has nothing to do with what Round_Dice said

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

      Variance vs expected value.

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

        Yeah, variance or standard deviation makes more sense. What I meant when I wrote it: Average of the absolute values of individual rating changes, which is called average/mean absolute deviation.

»
4 years ago, # |
  Vote: I like it +45 Vote: I do not like it

The writers picking people to test their round:

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -16 Vote: I do not like it

    Still couldn't make strong pretests for A,B

»
4 years ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

Really happy to see so many testers. Especially because there is so much variation in the colors: All colors from grey to black-red are there among the testers <3.

»
4 years ago, # |
  Vote: I like it +7 Vote: I do not like it

9 Problems with 3 hours?? Awesome

»
4 years ago, # |
Rev. 2   Vote: I like it +36 Vote: I do not like it

I still get flashbacks from global round 9

»
4 years ago, # |
  Vote: I like it +206 Vote: I do not like it

what is the point of tourist, Benq and their gang getting CF t-shirts every global round?
these guys must be using CF t-shirts as wipers.

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

    Hey, I understand that you want to make a point, but don't you think tagging them is unnecessary? I believe noone likes to be tagged just to see themself being joked about by random people.

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

    I didn't win a t-shirt last time ...

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

      I wonder how many t-shirts programmers like you have.

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it +5 Vote: I do not like it

      No problem. Even those who won don't get a T-shirt. click

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

      As someone who frequently ends up in the top 30 places, do you think it makes more sense to distribute the t-shirts to top 30 participants who have not received CF t-shirts before?
      This way will get many more participants excited about the global round.
      First time receiving CF t-shirt, you will get excited, the second time hmmm maybe a bit, the third time I am sure you would not even track the cargo.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    well maybe if they actually receive the t-shirts... I'm starting to wonder whether these CF t-shirts are actually real

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Personally, I do so with mine, not from cf though.

»
4 years ago, # |
  Vote: I like it -58 Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +232 Vote: I do not like it

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

    Literally me this round :( CF-Predictor predicted that I would lose 98 rating.

»
4 years ago, # |
  Vote: I like it -41 Vote: I do not like it

Will this be rated for div-2?

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

    Global rounds are rated for every division. Read the announcement carefully. It says "The rounds are open and rated for everybody."

»
4 years ago, # |
  Vote: I like it +36 Vote: I do not like it

question for administrators. are there any team contests planned in the near future, its so funny and interesting when you and your team can sit and solve problems in sports programming

»
4 years ago, # |
  Vote: I like it -12 Vote: I do not like it

BEST WISHES EVERYONE ...!

»
4 years ago, # |
Rev. 2   Vote: I like it -36 Vote: I do not like it

f

»
4 years ago, # |
  Vote: I like it -16 Vote: I do not like it

Why the next contest is after 9 days?

»
4 years ago, # |
  Vote: I like it +100 Vote: I do not like it

God damn it if it was 8 problems and 2 hours I would've made a joke about Barcelona

»
4 years ago, # |
  Vote: I like it +7 Vote: I do not like it

I like this contest ,because we have high competition in this,and problems are found to be so much interesting in global rounds.

»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

I hope that difference between the difficulty of two consecutive task (especially D and E) will be at most 400!

»
4 years ago, # |
  Vote: I like it -40 Vote: I do not like it

I am new to codeforces. Please let me know if this contest is rated?

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

    I think u have the ability to read the announcement carefully!

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

Looks like antontrygubO_o is famous for rejecting problems.

»
4 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Nine days without contest ...

FeelsSadMan

»
4 years ago, # |
Rev. 5   Vote: I like it +1 Vote: I do not like it

.

»
4 years ago, # |
Rev. 2   Vote: I like it -48 Vote: I do not like it

.

»
4 years ago, # |
  Vote: I like it +28 Vote: I do not like it

![ ](meme1.png)

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

Till now I am bearing the damages of two global rounds.

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

When will be the 2nd Div-4 contest?

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

    When mike need to have some load test of server.

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

Blog posts of non-educational rounds before the contest begins -> 150+ comments, many memes.

Blog posts of educational rounds before the contest begins -> 20-30 comments, hardly any memes.

Why does CF community like to comment and post memes more on non-educational rounds? Number of contestants are similar in both round types. I was just wondering.

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

    Educational rounds has traditional copy pasted announcement and same author,co-ordinator,testers.

    Non-educational different author, testers and sometimes different style of writing announcement. Memes and most of the comments are based on this writing styles, no of tester, color of tester, what happened on author's previous rounds ,wish and expectation from new author and so on

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Guess that "Rainbow Dash" thingie from round #662 had its effect on the testers.

»
4 years ago, # |
  Vote: I like it +18 Vote: I do not like it
meme
»
4 years ago, # |
  Vote: I like it +2 Vote: I do not like it

No more "Read all the statements" message ? :))

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

9 problems! Rated for all! It would be great if it was told at which problem Div2 coders should stop, and start seeing leaderboard for rest of the contest.

»
4 years ago, # |
  Vote: I like it -17 Vote: I do not like it

Hope it won't be a QueueForces or ThinkForces

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Newbie and Pupil testers give me hope

»
4 years ago, # |
  Vote: I like it +13 Vote: I do not like it

All the best everyone for the round :)

»
4 years ago, # |
  Vote: I like it +7 Vote: I do not like it

queue forces

»
4 years ago, # |
  Vote: I like it -25 Vote: I do not like it

long queue?

»
4 years ago, # |
  Vote: I like it -27 Vote: I do not like it

3 hours for this long queue?

»
4 years ago, # |
  Vote: I like it -27 Vote: I do not like it

tourist on fire !! Solved 4 out of 5 questions first till now.

»
4 years ago, # |
  Vote: I like it -44 Vote: I do not like it

Another Unrated Round I guess !! Long Queues ... feeling sad.

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Oh lord Omkar! please help me increase my rating

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    Don't worry Lord Omkar will Give you Power to defeat all your Worries !

»
4 years ago, # |
  Vote: I like it -6 Vote: I do not like it

Wow. What an excellent contest guys. Well prepared, interesting problem statements, you guys nailed it on this one!!

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Incredible contest, this is the first time I solved 4 in 1h30m, the problems are so good that you feel amazing after solving it.

»
4 years ago, # |
  Vote: I like it +24 Vote: I do not like it

Really Bad Pretests :(

»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Pretest kinda suck ngl

»
4 years ago, # |
Rev. 3   Vote: I like it +96 Vote: I do not like it

36 testers and 900 hacks

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -19 Vote: I do not like it

    I don't know why people complain about this every time.

    It's not against the rules that pretests are weak. It might be a questionable choice by the authors but it is not automatically a sign of shitty preparation.

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

      It is a very questionable choice on combined rounds. The top standings being determined by who hacked the most div 2 contestants is pretty dumb :/

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

        IMO the existence of combined rounds is a very questionable choice :P

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it -48 Vote: I do not like it

        I think hacks should not give extra points.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it -23 Vote: I do not like it

      It seems strange to me that some participants in top-100 can get extra 200-400 points by hacking grey or green guys. At least it adds some randomness to the competition.

  • »
    »
    4 years ago, # ^ |
    Rev. 4   Vote: I like it +18 Vote: I do not like it

    My solution to B in testing would've been hacked. Just because there are a lot of testers doesn't necessarily mean that authors use all of their solutions to check if tests are strong. I don't know why wasn't $$$t \leq 10^4$$$ which would've allowed random test cases to catch most bugs.

    Though i did help with test cases by trying to submit an unordered_map and gp_hash_table solution to A which both got AC and later realized that in those solutions didn't clear the hash table after each test case so then pretest 2 in A was changed to break solutions which don't clear the hash table/map after each test case.

»
4 years ago, # |
  Vote: I like it +16 Vote: I do not like it

Good problem set. How to solve F?

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Someone has a hint on E?

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +27 Vote: I do not like it

    a[i][j] = 2^(i+j) * (i % 2). You can figure out where to go by checking k & (2^(i+j)).

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How many bits do you need per diagonal in order to be able to reconstruct the solutions? How can you make sure you get this information?

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Was D Dp? I tried but was getting the wrong answer on one sample case.

Submission

States were dp(index, prev_selected, current_selected, next_selected)

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

    Just calculated the minimum number of changes to prevent 3 same characters ($$$LLL$$$ or $$$RRR$$$) in a row. Let's see if it passes the system test.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I did the same, tried to prevent the 3 same characters in a row. Hope this will work

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I did with DP, the pretests were passed. I did with 3 DP states, (index,curr,prev). Since I am not storing the next state, I had to specifically check for every possible starting state (as it is cyclic dp). You could check my submission here. 90129512.

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      I tried the same too with 3D dp). But it failed on the same case. So I tried implementing in 4D, maybe if I am missing some cases. At last, wasted my whole contest time debugging without knowing where I am getting a mistake.

»
4 years ago, # |
  Vote: I like it +27 Vote: I do not like it

I know I should blame myself. I also know that complaining about this is not good but...

How did you make the pretests?

»
4 years ago, # |
  Vote: I like it -57 Vote: I do not like it

Video Tutorial for D. Omkar and Bed Wars

»
4 years ago, # |
  Vote: I like it -16 Vote: I do not like it

Pretest2 in D is a bi*ch

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What were the hack tests for A and B?

»
4 years ago, # |
  Vote: I like it +9 Vote: I do not like it

Very weak pretest of B:

90095907

I think every number in pretest are greater than 0 and it makes so many hacks...

»
4 years ago, # |
  Vote: I like it +7 Vote: I do not like it

How do u construct the grid in E ?

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +12 Vote: I do not like it

    From every point, you can reach two new points. Ensure these two points have different values. Use uniquely identifiable values (0,1,2,4,8,16...) for each unique manhattan distance from the start point. You may repeat values, as long as two points touching at a corner don't have the same value.

    So for example,

    0 1 0 4 ...
    0 2 0 8 ...
    0 4 0 16 ...
    .
    .
    .
    

    Essentially at each point in the grid, you can determine the next move (left or down) because each of those two values will be different.

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

How to solve E?

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

    a[i,j] = fib(2*i + j) fib(0) = 1 fib(1) = 2 fib(n) = fib(n — 1) + fib(n — 2)

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How do you prove that there won't be any paths with the same sum?

»
4 years ago, # |
  Vote: I like it +67 Vote: I do not like it

Thanks for the not-ultra-strong pretests in the easier problems which left a healthy amount of hacking opportunities.

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

It Was Amazing

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Task E: How does this solution get TLE? My complexity 2 * n * q = 50,000 https://codeforces.com/contest/1392/submission/90167797

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

Fantastic round! Lot of variations in the set. Problem E stands out, really enjoyed that one in particular. Thank you authors and testers.

By the way, here is problem D on OEIS: https://oeis.org/A007040

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    can you explain a bit

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Calculate the minimum number of changes so that there is no $$$LLL$$$ or $$$RRR$$$.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      That's the total number of distinct strings of length n where all the players are acting logically according to Bed Wars strategy.

      That sequence is the number of (marked) cyclic n-bit binary strings containing no runs of length > 2, so it essentially tells you what to solve here, which can be done with a trivial DP.

»
4 years ago, # |
  Vote: I like it +2 Vote: I do not like it
  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Not the same problem, there is no nondereasing condition on the chosen subarray...

    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      Its same. I took a random code and now its accepted for today's C Soluton

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Not the same problem, there is no nondecreasing condition on the chosen subarray.

        The fact that the solution is the same doesn't mean it is the same problem, at least in this case when equivalence isn't obvious.

»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

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

    Jebaited (no NTT involved on the problem with 998244353 but FFT is involved in I XD)

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Nice round. I just wish there were fewer easy problems. 9 problems (in total) is too many. 7 or 8 next time please.

And more geometric scoring, obviously. It's bad that every next problem is worth only ~15% more points.

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

    Its rated for every body(global), not only for div1..

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

      Yeah, and div2 participants didn't really touch the hardest problems. If only it was possible to give different problem sets to div1 and div2...

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

someone please explain problem C

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    From i=0 to i=n-2, search for all peak values and find the differences between the peak values and the immediate next value, and then find the sum of those differences.

    Example: 5 6 7 1 2 3 4 5 1 2 3 5

    Here, the peak values are in index 2 (7) and index 7 (5). Sum = (7-1) + (5-1)

    It was quite easy for a C problem. Even I didn't check it out during the contest, thinking my skills wouldn't suffice for a Global Round C problem. Alas! :(

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      What is the logic behind it?

      • »
        »
        »
        »
        4 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        You take the last two segments. If the last is smaller than the prelast we need to add some hight to the last. Repeat for all i.

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

For me, problem E has a huge pitfall, and I debugged it for an hour:

(1 << (i-1)) is treated as an int rather than a long long(if you want to get long long) , so you need to obtain it by: 1LL << (i-1) // to complete the operation of h = 1<<(i-1)

»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

Great contest,problems are so interesting,I solved 4 problems but 6 wrong submission before it.

»
4 years ago, # |
  Vote: I like it +45 Vote: I do not like it

asd.jpg :)

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

Fun problems, thanks!

What would be the solution to F if the initial array was non-decreasing instead of increasing?

»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

RIP Newbies :)

»
4 years ago, # |
  Vote: I like it +13 Vote: I do not like it

Anyone solved E with a non-greedy approach? I think the constraints were chosen carefully to disallow such solutions, but did anyone manage to pass? I'm particularly interested in randomized/backtracking solutions for E. Did anyone solve using that way?

»
4 years ago, # |
  Vote: I like it -8 Vote: I do not like it

Thanks for the interesting problems.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Tnx for your fast responsiblity at contest

»
4 years ago, # |
  Vote: I like it +10 Vote: I do not like it

Thanks for the careful preparation and interesting problems.

»
4 years ago, # |
  Vote: I like it +7 Vote: I do not like it

A,B,C in like 15 minutes, and turns out all other not even close to a working solution. Not that exciting problem coice from my point of view.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Anyone else feeling the same after getting B hacked or failed at system testing because of initialising maximum as -1. F for me

»
4 years ago, # |
  Vote: I like it -19 Vote: I do not like it

I am back, whether you were waiting for me or not, but I am here.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Really great contest... Appreciating the effort

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

hello problem setter or admin I don't understand this .when this contest is running then hack my code in B problem (https://codeforces.com/contest/1392/submission/90140478) .But when contest end showing Final standings then i submitted same code then show code is Accepted(https://codeforces.com/contest/1392/submission/90171270)

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think it's because not all successful hacks become system tests

»
4 years ago, # |
  Vote: I like it -9 Vote: I do not like it

is it real to solve this problems with python? i had rly big execute time at A and B while it's almost insta launched in my jupyter notebook, any opinions? or u should know c++ ideal to solve contests like this?

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can someone point out my mistake? Thanx in advance. https://codeforces.com/contest/1392/submission/90167944

UPD: I got it.

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

No rating changes yet? Why so late?

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

For problem C, once I read the solution, I can understand why it works, but I am not sure how I would have arrived at the solution from scratch. Somebody help me?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Solution
»
4 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Leave it!

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    explanation
  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    The point is if you set every element to a constant say 1, then no matter what path duck will take sum will always be same, and if you output any path which is satisfying the sum i.e. in this case "any path" then your answer will be considered wrong as a specific path is to be printed which is hidden in the test case

»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Why is the next contest scheduled after so many days? Anyone has any clues?

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

    The group of people who run this website do so primarily to protect themselves. In reality, however, they form a secret organization to fight the evil in the world. In a few days they will return from their undercover assignments and then organize the next contest.

»
4 years ago, # |
  Vote: I like it +113 Vote: I do not like it

My congratulations to the t-shirt winners:

List place Contest Rank Name
1 1392 1 boboniu
2 1392 2 maroonrk
3 1392 3 ecnerwala
4 1392 4 tourist
5 1392 5 Petr
6 1392 6 ksun48
7 1392 7 tmwilliamlin168
8 1392 8 sunset
9 1392 9 whzzt
10 1392 10 hos.lyric
11 1392 11 qwerty787788
12 1392 12 molamola.
13 1392 13 Benq
14 1392 14 LayCurse
15 1392 15 Egor
16 1392 16 dreamoon_love_AA
17 1392 17 conqueror_of_tourist
18 1392 18 TLEwpdus
19 1392 19 nonamefour0210
20 1392 20 KAN
21 1392 21 ainta
22 1392 22 yosupo
23 1392 23 duality
24 1392 24 Errichto
25 1392 25 atomicenergy
26 1392 26 zeronumber
27 1392 27 okikust
28 1392 28 receed
29 1392 29 imeimi
30 1392 30 risujiroh
41 1392 41 blackbori
44 1392 44 LynCean
74 1392 74 Rewritetxdy
76 1392 76 wangziji
87 1392 87 Pa.Nic
91 1392 90 Nachia
127 1392 127 Azteca
180 1392 180 KostasKostil
200 1392 200 MForest
212 1392 212 Savior-of-Cross
271 1392 271 codelegend
276 1392 276 auto_mowu_machine
308 1392 308 Yongaron
331 1392 331 Clovers
336 1392 336 Nson
357 1392 357 yzc2005
387 1392 387 CHelle
431 1392 431 deyan
462 1392 462 leocp1
496 1392 496 nehan_der_thal
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

This is a very good contest.