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

Автор shishyando, 4 года назад, По-русски

Привет, Codeforces!

Мы приглашаем вас принять участие в контесте, который пройдет в 19.05.2022 17:35 (Московское время). У вас будет 2 часа на решение 8 задач. Раунд рейтинговый для участников обоих дивизионов.

Я бы хотел поблагодарить тех, благодаря кому этот раунд состоится:

Также мы бы хотели поблагодарить компанию NEAR, при поддержке которой проходит этот раунд. Компанию основал бывший участник соревнований AlexSkidanov. Также в команде, разрабатывающей NEAR, работают многие известные участники сообщества, например, дважды чемпион мира ICPC eatmore и победитель GCJ и TCO Egor.

  • В раунде предусмотрены призы в NEAR коинах для участников, которые займут первые 255 мест. Победитель раунда получит Ⓝ128, участники на втором и третьем месте по Ⓝ64, участники на следующих четырех позициях по Ⓝ32, и так далее.

  • Кроме того мы рады сообщить, что достоверные участники (уже участвовавшие хотя бы 5 рейтинговых раундах), занявшие одно из первых 255 мест, также получат приглашения в проект CrowdForces! Этот проект запущен на NEAR уже как полгода и позволяет участникам получать Ⓝ за решение задач на CrowdScript с разных платформ: Codeforces, SPOJ, E-Olymp, AtCoder, UVa Online Judge.

Именно с этим проектом связаны легенды в условиях на русском языке. Они идут курсивом в первом абзаце каждой задачи.

Разбалловка задач:

500750125015001750200025003250

Мы надеемся, что вам понравятся задачи! Удачи на контесте!

Разбор: ссылка

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

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

As a tester, I really loved the round. One of my favorites in recent years, I'd vote at least two tasks for candidates to 'best of 2022'. Please participate!

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

    As per history of codeforces, whenever a tester says the round will be very good, the contest turns out to be bad.

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

    fucking clickbait

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

    I'm sorry that these two tasks had to be replaced, I hope that we'll see them in the future.

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

      Don't get me wrong, the problems were ok and interesting, but Kacper is always fascinated by so-so problems.

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

        You know people don't have to like the same thing, right? You're around 3400, I'm around 2400 — we're not the same xD

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

          Yeah, ofc. I can be mistaken too, so I'm all ears, which problems deserve to be the best ones in 2022 and why?

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

            BTW. I tested quite a long time ago, and have learnt only recently about some issues like extremely weak pretests in C or short contest duration. I wouldn't support any of these decisions...

            In my opinion, D is an exceptionally good easy problem that has everything: nice, natural and simple statement which almost makes you wonder why is this not a well-known task. The solution was far from obvious to me, yet very simple and elegant. Although I guess perception changes if someone is as high rated as you, Mateusz. Most people wouldn't nominate easy problems to 'best of ...' because 'it is all obvious anyway'. But overall I don't remember any task of similar difficulty or easier having a 'wow-factor' for me in 2022. Simple and good algorithm problems are so rare nowadays...

            My other favourite task was G. I just loved solving this problem, as I was unravelling new layers of inference-based observations without doing bullshit guessing like "oh I can't prove this but it has to work this way, otherwise unsolvable". Plus, of course, somewhat natural statement about algorithms and reduction to something standard in the end. You know, I like when the task is not just about some formulas...

            I tried to give some justification. Of course you may not agree with it. Oh, and also, it's mid-May so it's comparatively easier to be best in 2022 :)

            I hope you've at least somewhat enjoyed the round despite my tiny bit of clickbait

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

          Then I'll give my opinion as someone much closer to 2400 than 3400: among A-G, I liked D but it's not like super amazing. In CEF, I mostly put effort into not messing up my implementation since I immediately knew roughly what I needed.

          G is a combo of avoiding mistakes in reading, reducing GCD to the simplest possible form (the construction) and avoiding mistakes in typing since the construction says to find matching. I suppose the construction part's nice, at least it doesn't feel like divine revelation like most constructions, but I'm just not a huge fan of construction problems in general.

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

    Maybe one task is best of 2011.

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

    This comment didn't age well.

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

I think having 2 hours and 15 minutes in a 8-problem contest is better.

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

I hope the contest is good

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

As a tester, I missed the final rated round of my teenage.

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

I hope the problems are interesting and easy. Good luck for my first contest , and for everyone too!

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

I don't think 2 hours is really enough to solve 8 problems.Maybe 2 and a quarter or two and a half is better?

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

Удачи всем вы все всё сможете но я постараюсь решить хотя бы задачи A и B.

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

As a tester, I want to say participate in this round!

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

Earlier there was a separate Div1 and Div2 round, but now it's a combined round. What was the reason?

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

As a tester, I'm a bit jealous that you all get to compete for prizes lol

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

Why is it combined?

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

As a tester, I get to mention _Vanilla_ for no reason.

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

I have also registered to round with id 1683 (that is, round #792 div 1), while it was visible. Can't wait to see where I will get redirected when the contest starts.

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

NEAR coins in this round worth a lot less than NEAR coins in that previous round. :(

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

Can't wait for the contest. Hopefuly I'll be able to solve at least 2 questions.

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

looking forward strong pretest !

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

Good luck!

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

You will have 2 hours to solve 8 problems.

Gonna have to dance with pen now

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

I really love the coins distribution.

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

I am not able to register now

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

Hopefully, I pass system test for all questions for which my pretests are passed. Last two times it didn't :(

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

operationforces

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

Weak pretests for C I guess. My $$$O(N^3)$$$ passed lol.

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

Problem H was here. Unfortunately, I wasted most of my time on the contest on H because the solutions posted there are wrong.

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

tourist gets back to rank 1 through 1 hack!

»
4 года назад, скрыть # |
 
Проголосовать: нравится +183 Проголосовать: не нравится
Trying to hack B
»
4 года назад, скрыть # |
 
Проголосовать: нравится +31 Проголосовать: не нравится

Tougher B: Link

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

greedy forces!

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

Most of the problems were nice, I liked the contest as a whole. Though unfortunately F just felt like tedious implementation (30+ mins) with not much thinking involved.

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

some one pls tell that how to solve C :*

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

Hmm, where did I see that plot twist happen before?

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

Can anyone tell me whats wrong in my D solution here

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

Amazing contest, I love it!

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

I think you should use Bold words to tell us following operation exactly once in problem C, It wasted me 1h!

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

C was dirty case-work. and the mex=0 case of E(WA pretest 6) should have been in the samples.

However, D and F were cool.

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

Is D a DP solution?? if yes then how do i optimise it from O(n^2) complexity

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

Made a clutch solution on E at 1:59:46 and it passed pretests. :)

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

I feel like F was slightly easier than D,E. At least D required an idea, F was just juggling claims about segments.

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

spent too much time on different DP strategies for D but then realized it can be done by greedy

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

B is not a programming problem.

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

is E solvable without implicit treap? my idea was to find answer for mex(0), mex(1), ..., mex(n). each would take log^x (n) time. for each mex(i), you do the following:

  • if you have i currently in the array, decrease it's frequency by one, otherwise find the element with smallest frequency and change it to i

  • (update the change frequency in the implicit treap, erase the previous frequency and insert the new one, if it is > 0)

  • now you have k-i-1 operations left, you use them to decrease DIFF as much as possible. you decrease DIFF as much as possible by changing the numbers with smallest frequencies to the number with biggest frequency until you can. you don't have to actually change them, just find how many of the smallest frequencies sum up to <= k. that's doable with binary search in implicit treap with sum queries.

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

Please give a hint about D

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

Hello, How to solve C? I understood the statement and I can't implement the solution. any help?

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

    find any wrong positions of any two elements and replace their columns then check your solution is correct or not. wrong positions means that an array element such that it doesn't exist in allowed position in a sorted array .

    for example : in this array [1,2,3,3,4], the allowed positions for 3 is 3 or 4 only and for 2 is 2 only .

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

    You can refer to mine. 157703045 I just checked if there exists any such row where the (j+1)th element is smaller than the jth element, if it exists then I simply marked that row and and searched for two indices in that particular row where the numbers should be swapped. Then simply for that two indices i swapped the values for every row. After that simply traversed the matrix and checked whether the conditions are violated or not. If any such case found then print -1. else print those two indices.

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

    First of all if $$$m = 1$$$, then the answer is $$$1$$$ $$$1$$$ otherwise :

    We consider a number in an array $$$bad$$$ if it is not in it's correct place in sorted form of the main array, So if the number of $$$bad$$$ numbers in any row was more than $$$2$$$ then the answer is $$$-1$$$, In other cases, Store the index of one of the rows that has exactly $$$2$$$ $$$bad$$$ numbers, then find the indices of two $$$bad$$$ numbers in that row, For example they're at indices $$$i$$$ and $$$j$$$, then swap all the pairs at indices $$$i$$$ and $$$j$$$ for each row or better to say is swap column's $$$i$$$ and $$$j$$$, Then after all if you found any row unsorted, the answer will be $$$-1$$$ otherwise the answer will be $$$i$$$ and $$$j$$$.
    157737517

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

How to solve E?

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

I hope there won't be 700 systests in H which will disappear later like some time ago.

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

FSTforces. Wait and see how many people will FST on C.(including me :( )

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

this was the best speed forces. what is happening there?

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

Why is pretests for C so weak?!

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

nice round hope not to turn on depression mode after system tests

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

Question B appeared on codeforces not long ago

https://mirror.codeforces.com/gym/103415/problem/H

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

nice problems...In D I sorted in non-increasing order as {value-(n-index),index} then took the first k pairs and set their indexes as the traps to be jumped over,I thought this would be optimal and it passed, but any proof why it's optimal??

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

    Consider the amount of damage you prevent by picking each trap. Say the first trap you pick is index $$$i$$$. You save $$$a_i - (n - i)$$$ damage because you no longer take $$$a_i$$$ damage from the $$$i$$$th trap, but all $$$n - i$$$ traps after index $$$i$$$ take bonus damage. After picking the first trap, ALL remaining values increase by $$$1$$$. Traps before index $$$i$$$ increase by $$$1$$$ because there is one less trap after it that takes bonus damage. Traps after index $$$i$$$ also increase by $$$1$$$ because you save the $$$+1$$$ bonus damage dealt by index $$$i$$$ by choosing that trap. So all values change by the same amount, and it is correct to still sort by $$$a_i - (n - i)$$$ for future decisions.

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

    There is an easy proof by changing the problem to an equivalent one.

    Note that we always jump exactly k times. Change the problem, such that we DO take the bonus damage when jumping over a trap (we still don't take the trap's base damage). Note that the answer to the changed problem is always $$$k (k - 1) / 2$$$ larger than the answer to the original, so subtract this from your answer to get an equivalent problem.

    But now, the damage we avoid by jumping over trap $$$i$$$ (zero-indexed) with damage $$$a[i]$$$ is exactly $$$a[i] - (n - 1 - i)$$$, as desired.

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

FSTForces..

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

So many system test failure in C

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

Wow very strong pretests. Good bye codeforces shifting to Atcoder and Codechef

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

I only solved A, I hope next contest I will solve 3 problems.

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

When the test-case setters confuse a Codeforces Div. (1 + 2) with a TopCoder SRM.

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

Thank's for this brilliant pretests

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

Poor pretest hurts more than wa, thanks to problem setters for giving me a bad day

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

The wonderful pretest made me go through the worse 520.

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

Thanks for the amazing pretests :(

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

What is there in D's Test Case 77?
FSTs in both C and D, hope the edge cases that I've apparently missed are outrageous enough...

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

f*** the pretests of C

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

Other than problem C, I liked this round a lot. Problems D, F and G were nice, and for an easy problem, B was very good.

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

Finally algo tasks and systests, thank you!

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

Weak pretests hurt :'(

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

PRETESTS SUCKS Especially for D, how can wrong code even pass systests? (If test case 77 wasn't added by the hack, many wrong code might be passed!)

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

The problems were not bad, but the pretests were extremely weak. How did my D pass the pretest even though I mistook i * (i-1) / 2 for k * (k-1) / 2?

After getting -200 delta, now I have to go back to candidate master and participate Div.2-only rounds again.

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

As a tester, you all guys did shitty job

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

 pretest

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

Can somebody give me any stress test for E?

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

Thank you for the contest.

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

Despite the pretests for B and C, the system tests for problem G are also weak. Some greedy solutions without any type of matching algorithm can easily pass them. Some Accepted codes even wrote a case wrong(big + 2 * small > m instead of 2 * big + small > m). See 157733355, 157719356, 157726787.

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

There were 22 tests in problem C, and Mine had to fail on the last one :) lucky me

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

1300 (before sys test) -> 900 (after sys test) lol

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

I'm thinking about why Codeforces divide test cases to pretests and system tests, and there might be two reasons.

  1. Using pretests instead of full tests during the contest can sometimes avoid the server being overwhelmed by too many judging tasks.

  2. If someone come up with corner cases which are not initially included in the system tests, those cases will be added to system tests and a rejudging is needed. But a rejudging is almost the same as pretests / system tests.

In the ideal case where the server is very powerful and the original system tests already cover all corner cases, I think we probably don't need pretests / system tests.

See also this discussion.

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

Cheaters copying each other code for C need to stfu and stop crying. Try to learn and get good, then you wouldn't cry about failing test.

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

At least the rating of this announcement behaves like crypto prices.

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

Was it the following distribution of problems today?

Div2 A
Div2 B 
Div2 C / Div1 A
Div2 D / Div1 B
Div2 E / Div1 C
Div2 F / Div1 D
         Div1 E
         Div1 F

Or it’s slightly different?

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

https://mirror.codeforces.com/contest/1684/submission/157739291 can anyone please help i am not able to understand where i am going wrong

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

https://mirror.codeforces.com/contest/1684/submission/157739291 can anyone help me in getting where i am going wrong

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

To not keep you waiting, the ratings are updated preliminarily. In a few days, I will remove cheaters and update the ratings again!

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

How did this () contest get NEAR's support?

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

Why so many downvotes?

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

Good contest , but f**king pretests !

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

weak pretests on C

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

i am loser that can not have a green color, wuwuwuwu,cry...

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

Although I don't perform well in this contest, I appreciate the quality of the problems, especially the problem D. I didn't realize that the reduced scores of jump can firstly be ignored and finally be calculated by k*(k-1)/2 after all jumps. According to this property, the reduced cost of each jump in index i can be calculated by a[i]-(n-i-1). Then I can sort the reduced costs and simply use greedy strategy by choosing the first k large reduced costs to solve the problem D.

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

Any idea why this solution is getting TLE?

The complexity (as I calculated) is O(m*n), where m*n<=2*10^5

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

good contest and good problems.

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

Do we need to sort the columns in C? I thought it could be done faster than O(m * nlog(n)) time. My O(m * n) solution was accepted. My idea behind it is as follows:

  • I check how many pairs of columns violate the rules of a good grid. If there are no such columns, we don't need to do anything. Swap any column with itself. If there are more than two such pairs of columns, the grid cannot be fixed with a single swap. Now we're left with non-trivial cases.
  • Else, if there are two such pairs of columns, I swap the larger column of the first pair with the smaller column of the second pair. For example, with one single row [1 5 3 4 2 6], the pairs of columns that violate the rule are the 2nd and 3rd ([5 3]) and the 4th and 5th ([4 2]) columns. Hence, I swap column 2 with 5, and the row becomes [1 2 3 4 5 6].
  • Else, if there is only one such pair of columns, I swap the larger column that comes first with the smaller column that comes last. As in, with one single row [1 2 2 1 3], I swap column 2 and 4 and the row becomes [1 1 2 2 3], and [1 2 1 1 3] becomes [1 1 1 2 3].
  • After those swaps, I check if the grid satisfies the conditions. If it still violates them, the grid must be unfixable.

Is my complexity analysis wrong? Can anyone hack my solution?

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

Please help ;(. I don’t know how to get my crypto.

P.s. My email is unavailable. Maybe I should restore my email?

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

How can I get my near? I got place 128 but I didn't receive an email.

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

Where is the prize?

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

Regarding getting the prize, if I submitted public key from my old account, then my money for this round is gone? The bot does not seem to create new accounts even with new public keys.

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

Can anyone recommend where I can exchange this NEAR nonsense for USD or any real currency?

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

After sending the public key, I accidentally refreshed the web page and I lost my passphrase. What should I do?

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

great round bro enjoyed reading problems