Автор Golovanov399, 5 лет назад, По-русски

Добрый день!

В воскресенье, 25-го сентября в 14:05 по московскому времени состоится Отборочный Раунд 1 олимпиады для школьников Технокубок 2021. Раунд будет длиться два часа, участникам будут предложены 6 задач. По его результатам лучшие участники (но не более 45% от общего числа участников раунда) будут приглашены на финальный этап в Москву. Для регистрации на раунд и участия перейдите по ссылке. Не забудьте заранее зарегистрироваться на раунд! Для опоздавших будет открыта дополнительная регистрация (с 14:15 до 16:05).

Зарегистрироваться на Отборочный Раунд 1 →
Соревнование открыто для всех в виде отдельных раундов для первого и второго дивизионов.
Для всех участников всех трех редакций этого соревнования будет пересчитан рейтинг.

Параллельно с Отборочным Раундом будут проведены открытые рейтинговые раунды для обоих дивизионов, в них могут принять участие все желающие.

Напомним, что согласно правилам раундов Codeforces во время соревнования ваши решения будут тестироваться только на претестах (предварительном и неполном наборе тестов), а системное тестирование состоится после окончания раунда. Обратите внимание, что претесты не покрывают все возможные случаи входных данных, поэтому тщательно тестируйте свои программы! После прохождения претестов у вас будет возможность заблокировать решение, тем самым получив привилегию искать ошибки и взламывать чужие решения, но отказавшись от возможности перепослать ваше решение при каких-либо обстоятельствах (например, даже если вы найдете ошибку или вас взломают). Со временем задачи падают в стоимости. После системного тестирования учитываются только полные решения. Подробнее про правила соревнований можно прочитать по ссылкам:

Регистрация на олимпиаду Технокубок еще открыта. Победителей и призеров олимпиады ждут значительные квоты при поступлении в престижные технические вузы России и ценные призы! Если Вы школьник 8-11 классов и пока не зарегистрировались на Технокубок, то самое время сделать это:

Зарегистрироваться на олимпиаду →
После регистрации на олимпиаду не забудьте зарегистрироваться на Отборочный Раунд!

В финал соревнования будут приглашены лучшие участники каждого из отборочных раундов (но не более 45% от общего числа участников раунда).

Авторы отборочного раунда — AndreySergunin, Endagorion, amethyst0 и я, Golovanov399. Спасибо KAN и 300iq за координацию. Кроме того, хочу выразить благодарность тестерам, без помощи которых этот раунд не состоялся бы: kalki411, 300iq, arjunsanjeev7, brunomont, Chocobar, iankury, low_, psevdoinsaf, JinhaiChen и teapotd!

Для тех, кто впервые на Codeforces: в таблице ниже вы можете найти примеры решений на всех поддерживаемых языках:

Группа языков Языки программирования / компиляторы Примеры
C GNU C, GNU C11 10903473, 17029870
C++ GNU C++, GNU C++11, GNU C++14, GNU C++17, MS C++, etc. 23794425, 5456501
C# Mono C#, MS C# 3195513, 3794163
D D 5482410, 2060057
Go Go 7114082, 21366098
Haskell Haskell 455333, 1668418
Java Java 8 25491359, 23678167
JavaScript V8 35963909, 35681818
Kotlin Kotlin 25779271, 25204556
OCaml OCaml 6157159, 1281252
Pascal Delphi, FPC, Pascal.NET 1275798, 1259434
Perl Perl 2519448, 1277556
PHP PHP 413942, 35875300
Python Python 2, Python 3, PyPy2, PyPy3 35883730 (Py2), 36179112 (Py3)
Ruby Ruby 1837970, 1289551
Rust Rust 25180002, 35652442
Scala Scala 35847980, 2456025

Удачи!

Обратите внимание, в Отборочном Раунде Технокубка будет 6 задач, предварительные стоимости:
500 — 1000 — 1500 — 2000 — 2250 — 3000.

В div. 1 будет 5 задач, предварительные стоимости: 500 — 1000 — 1250 — 2000 — 2500.

В div. 2 будет 5 задач, предварительные стоимости: 500 — 1000 — 1500 — 2000 — 2250.

Поздравляем победителей!

Технокубок:

  1. oleh1421
  2. usachevd0
  3. turmax
  4. kiyotaka
  5. sadovan

Div. 1:

  1. tourist
  2. QAQAutoMaton
  3. Rebelz
  4. Marcin_smu
  5. jijiang

Div. 2:

  1. Algorithms_with_Shayan
  2. KanbeKotori
  3. waaitg
  4. DepthFirstSearch
  5. AceKing

Также опубликован разбор.

UPD: Участники, кто набрал 1800 и более баллов будут приглашены на финальный этап олимпиады.

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

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

As the author of two problems I'd like to ask you guys to read all the problems and not to rage quit if you dislike a problem too much

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

Is it rated?

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

As a tester, Problems are really good and interesting. Good luck!!

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

I see low_ as a tester. Congrats!!

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

As a tester, I approve this contest.

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

In before

If you don't want failed system testing, submit correct code

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

I am able to register for official contest too is it ok .

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

Which One should I register for uprating? (rating ability about 1900) Could anyone give me some suggestion

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

Take care of the unusual time.

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

Just noticed that russian comments are visible in russian transcripted mode with english comments .

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

HALA Madrid!!!

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

Notice the unusual starting time,Golovanov399,I think this should be mentioned

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

Notice the Unusual time. GOOD LUCK :)

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

Oh my
Notice that it is based on the olympiad (kind of) for Russian students of 8-11 grades.
For some reason it is not written so explicitly in the English page. But better be prepared

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

Judging from the announcement, the official round is not rated, and the div1 and div2 versions are rated. Is my understanding correct?

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

As a tester, I just wanted to say I love this community :D and thank you KAN for reaching out and giving me this opportunity

I'm still seeing a lot of upcoming future contest :3

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

I hate problems

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

As a tester, I highly recommend writing this round.

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

An interesting thing happened. Yesterday,my rating was still 1900 + and I was able to sign up for div1. After the end of yesterday's contest, I dropped to 1800 +, which should not be able to fight div1, but I was still in the div1 queue. So do you think I should quit div1. :) (https://mirror.codeforces.com/contestRegistrants/1434)

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

As a tester , problems are balanced+Cf-Level and great effort by setters . ATB.

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

Who can tell me if the problems in the 3 contests with same preliminary costs are a same problem? Thanks a lot! By the way, I tried to register for the Div.2 contest as usual, but I failed and got the information "Rating should be between 0 and 1,899 in order to register for the contest". I remembered that the Div.2 contests were for users whose ratings were between 0 and 1,999 (or 2,100) usually. Was it common for this situation?

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

rated???

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

Today there seems to be a very long queue. I hope it is fixed before the round.

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

I know this is not the right place to ask but I'm facing problem with codeforces. My codeforces from last night is loading in russian and every time it takes few seconds to translate the page into english but its happening every single time for every page of codeforces.

Also i'm seeing few keywords change in codeforces like "Accepted" to "Complete Solution" and "Submission" to "Attempts". Can anyone help me out? Apologies for posting it in this blog but this blog is active so I asked here.

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

It's great to see a lot of upcoming contests in the contests calendar.

Spoiler

Good Luck EveryOne!

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

am I the only one who reads all the comments and vote them ? codeforces comments section is really fun to me! :v

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

Could anybody tell me why the registration for Div. 2 is already closed? Is it because of some participant limit? You can still register for Div. 1...

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

I didn't expect such problems. Typing it in the middle of contest can show you my frustration level..

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

Anyone else suspicious of D being "well known" problem in China?

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

contest has made me wonder if i'm way dumber than I though I was ;-;

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

After 1396C - Monster Invaders, I decided to not read tasks with monsters/enemies and more than 3 parameters in input. It is not good for my mental health.

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

1B/2D is easier than 1A/2C.

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

I don't know why, but it seems that the contest is too friendly to Chinese OIers.

Almost half of the first 50s are Chinese OIers...

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

How to solve 2C?

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

what's pretest 9 in div2 C?

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

What's the hack point of Div.1B?

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

Div 2C, What was I missing, anyone please help?

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

What was pretest 9 on D2C? I noticed most solutions that failed 2C got WA on test 9. (so did I T.T)

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

How to solve Div2C/1A?

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

Div 2 D was pretty easy ! just hope that it has strong pretest.

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

Holy shit this is the first time I solved all problems in a div2 contest DAYUM.

GOD of codeforces, please make it so I don't fail any system tests, please!!!

update: All tests passed :)

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

how to approach C?

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

How to approach C?

was ternary search going to help in any way?

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

    Sorry, first I wrote the full idea and you only wanted approach, so it's spoilered now.
    Anyway, when I solved it, it kind of reminded me of the standard problem taught in DSA "merge k sorted lists".

    There are only 6 possible strings so the first thing I thought was — from each note generate all 6 options for the fret, which are the differences from each string.

    Then I said, for the hell of it, let's sort each of them (because of the median-of-medians selection algorithm).

    Now try to continue from here by yourself, you have n sorted arrays of size 6. If you want the rest, look below.

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

      oh great implementation thankyou.

      my dumb ass was thinking that the answer's graph would be something like \/ in shape and i could apply ternary search on it. i later found out that it was stricly decreasing and then strictly increasing but it also had some portion parallel to x-axis. that where it fucked up... i was clue less after that. :(

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

      I have doubt you didn't changed minimum at all ?

      why did you worked on maximum only?

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

        If the best solution has a smaller minimum, then eventually by lowering the maximum the minimum will be smaller.

        For example, if you have [8,4], [6,3] you start with the option 8,6 which gives difference of 2. Then you change 8 to 4 (minimum is now changed from 6 to 4). Now you are at option 4,6, which again is diff of 2, so you change 6 to 3 (again minimum changed from 4 to 3), and you get the best option with diff 1: 3,4.

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

Thank you guys for the Div2 C really enjoyed doing it :)

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

How to solve div2 B?

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

Why TL in C is too strict. My O(NlogN) gives TL on test 9. Why? Why?
link

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

Can someone give some hints for Div1 D?

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

Man I thank authors for problem D2C .. really felt a super satisfied after solving that problem

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

Div1 ABC were selected while high on something, huh? A is a good problem but seems way harder than a typical A, B is just a basic idea and implementation (I'd swap them) and C is just some weird ugly adhoc. Call it personal preference, but that is a ragequit problemset.

At least D is very interesting. My solution is based on proving that we don't miss the best path if we pick a diameter and use one of its vertices as one end of our path. Next, we can assign a state $$$X_v$$$ to each vertex $$$v$$$ where for a stone edge $$$(u, v)$$$, $$$X_u \oplus X_v = 1$$$. That means we're dealing with 2 fixed rooted trees and queries "invert all $$$X$$$ in a subtree" and "find the deepest vertex with $$$X=0$$$", which can be done with a segment tree in $$$O(N+Q\log{N})$$$.

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

What was pretest 11 on div2 D?

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

Was C precomputation with a small dp of prefix and suffix?

.Can anyone tell that my solution will pass or not . Solution link. Code Link

Pre-thanks to the reader of the comment!

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

Why is Div1C a routine maxima finding problem?

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

Can someone please help me in 2C/1A? I formed an array of all possible ferrets I can chose by also storing the index for which I get that ferret. After that I just iterate over all possible values of ferret using two pointer. Whenever I get a condition that the current indices have all notes atleast one, I consider it and increase the lower indice by one. ANd whenever I dont comeup with such a situation, I increase the upper indice by one. Can someone please tell where did I go wrong?

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

You can copy-paste problem Div.1D from either here or here, and then add 5 new lines to adjust it to this problem. Too sad I read Div.1E first. =/

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

Seems that m2.codeforces.com had periodically been unstable during contest. Why is that?

(Had it been accessible, I would perhaps have one more problem Pretest Passed... sad story)

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

In div.2,why C C and why E E?:/

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

Problem D was way easier than C, I wasted 60-75 min on C and then started D and it took only 10 min. Even no of ac submissions say it. If D and C were interchanged D would have had 1000+ and C would have 400 and would have been reasonable.

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

How to solve A?

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

Learnt 2 lessons

1)If you see a problem which even IM's are struggling to get AC, skip that and move to the next problem (Iam looking at you 2C/1A)

2)If you keep on getting WA on a particular test case, instead of debugging do ctrl + A + del start from scratch

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

Bad ordering of questions. Why is D 500 points more than C?

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

Is there a DP solution for 2C, two pointer approach worked for me but I wasted too much time thinking about a dp solution.

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

Golovanov399 reporting cheating cases this and this
Even their handles are similar lol.

MikeMirzayanov please take care of this, he is ranked 4 in div2.

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

Waiting eagerly to see ecnerwala solving 2C/1A in his stream .

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

There seems to be some issue with java platform. Problem B is giving TLE for a simple O(n*m) solution.

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

why my sol for div2 D getting tle https://mirror.codeforces.com/contest/1435/submission/96683823 please help..

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

haha )) :

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

Tired of weak pretests now. 4 FST in last 3 contests. -_-

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

If you struggle with C for 1.5 hour, maybe you should read D... The more you know

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

From now on I won't ever trust any tester saying than he approves the contest/loves the problems/finds them interesting. The same goes for "don't rage quit the contest" — today it was the best possible tactical move.

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

I wonder why tourist's submissions got skipped except the first one(which took part in the systest).... __ Just be curious, shouldn't the last submission count into the systest(instead of the first one)? Or I missed something?

https://mirror.codeforces.com/blog/entry/84056?#comment-714979

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

I have solved only two problems in today's contest. One of them got tle in main tests. Please god let me know is it a dream?:()

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

submissions 96704396 and 96676432 are exactly the same code, but one of them passed while the other got TLE on test 17.

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

    May you rejudge submissions of D? Many of them are very close to the time limit(but we don't know that during the contest since their performance are good on pretest), and those submissions're hopefully to pass with fread or rejudging. I think it's not the intention of problem to distinguish the codes with fread and the codes without.

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

I: Nice! I finally passed Div1.D!

System Test: No, you didn't.

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

please anyone check to it

my solution is O(n) for div2B and it still shows TLE what i am doing wrong how can i further decrease time complexity people have submitted in O(n) and they are accepted ?? Help

https://mirror.codeforces.com/contest/1435/submission/96705858

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

How to create a large number of [TLE failed system test] :

  1. Set a tough time limit.

  2. Don't put into pretests the test on which most solutions run slowest.

  3. Enjoy FSTs.

:)

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

What the hell is this!! why so strong time constraints, is it even possible to pass Div2B in python? My Code

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

A good round! But,in fact,I don't think the order of problem A and B is correct.The statistical data also showed that problem B is easier than A.And of course,I tried to solve A for 1h,then give up to solve B,and solved it after just 7min.I'm very angry for I solve B so quickly but still got lots of penalties for B.

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

Why cin is THAT slow?

It took cin about 800ms to read just $$$4\times 10^5$$$ integers that $$$\leq 10^6$$$?

https://mirror.codeforces.com/contest/1434/submission/96673580

https://mirror.codeforces.com/contest/1434/submission/96703647

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

what is wrong with this approach for problem D we will fill the value in increasing order for example if we have queries like + + 2 + 1 + 3 + 4 bla bla bla so for (first 2 pluses ) we will assign 2 and 4 next we will assign 1 and so on but this gives wrong answer can anyone explain.

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

When will rating be updated?

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

Any issue with this contest ? Can't find the problems in problemset

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

Подозреваю, что у меня задача е была протестирована неправильно. Претесты прошло. Выдало idleness limit на системном тестировании, на тесте 6 (и это странно). При повторной посылке того же кода (в дорешку) выдаёт "полное решение".

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

Can someone tell me why I am getting TLE in problem D2B? If I am not wrong, I think it is O(nm.log(nm)) solution.

https://mirror.codeforces.com/contest/1435/submission/96684311

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

When will ratings update ?

Edit : Updated

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

Screenshot-2020-10-25-235710.png When shit gets too overwhelming to handle

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

For div2 c, I thought about an algorithm to check whether all values ​​of 1-n appear in the interval. I thought of a hash algorithm, specifically like this, for each i of 1-n, generate a 40-bit random number x, and then use an array of 128-bit numbers to store the hash value. For 6*n numbers, if each number is generated by the i-th number, the upper 40 bits will XOR a random number x no matter what, if i is the odd number of times (you can use map to count), the middle 40 bits The upper 20 bits of the XOR of the upper 20 bits of x, if i is the even number of occurrences. The lower 20 bits of the middle 40 bits are exclusive OR of the lower 20 bits of x. Divide x into four segments, each 10 digits, marked as 0-3, set y as the number of occurrences of i%4, if y=0, XOR the lowest 10 bits of the lower 40 bits to the segment 0 of x, and so on . Then the XOR sum of the interval (l,r) can be calculated like this: XOR hash[r] into hash[l-1]. For each i, if it appears an odd number of times, there must be x in the upper 40 bits, if it appears 2, 6 times, there must be x in the middle 40 bits, and if it appears 4 times, there must be x in the lower 40 bits x, then just take out the high 40 bits, the middle 40 bits, and the low 40 bits and then XOR, the value obtained is XOR with the random number x of 1-n, and check whether it is the same.upd: I found that I was wrong, sorry.

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

Sad, why is the first digit of my ID not a number

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

Will we get editorials for this round? coz I am waiting for it.