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

Автор Livace, история, 7 лет назад, По-русски

Привет, Codeforces!

23 октября в 18:35 MSK состоится рейтинговый Div. 2 раунд. Участники из первого дивизиона приглашаются для внеконкурсного участия.

Задачи для раунда были подготовлены мною. Спасибо Даниилу (qoo2p5) Николенко, Никите (FalseMirror) Босову, Александру (Alladdin) Проскурину, AmirReza (Arpa) PoorAkhavan, Ильдару (300iq) Гайнуллину, Алексею (ashmelev) Шмелеву за помощь в подготовке и тестировании задач, Ане Изюмовой за помощь с переводом, Николаю (KAN) Калинину за координацию раунда и Михаилу (MikeMirzayanov) Мирзаянову за замечательные платформы Codeforces и Polygon.

У вас будет 2 часа на решение 6 задач.

Надеюсь, вам понравятся задачи! Удачи!

Upd1: Разбор

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

Div1

  1. Farhod
  2. vintage_Vlad_Makeev
  3. KrK
  4. rajat1603
  5. chemthan
  6. Barichek

Div2

  1. wzp666
  2. isybuq154
  3. SORONGON
  4. Sheng_D_Bao
  5. wxh010910
  • Проголосовать: нравится
  • +187
  • Проголосовать: не нравится

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

Автокомментарий: текст был обновлен пользователем Livace (предыдущая версия, новая версия, сравнить).

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

Is it rated?

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

As far as I recall, all Codeforce Rounds in the past 8 months ago since joining the Codeforce community have been rated by default, unless otherwise stated before, during, or after the Contest.

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

As far as I remember, all the Codeforce Rounds in the past eight months have been rated unless otherwise stated before, during, or after the Contest.

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

    "stated before, during, or after the Contest."
    lmao

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

      During or after the Contest due to sudden troubles during the Contest such as significant error(s) in some problems or temporary server failure.

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

seriously guys , how two comments with same question and in the same time and they have the same color :/ , the first got upvotes and the other one got downvotes ?

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

** ** *****?

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

** ** *****?

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

Is it Rated Contest or unrated???

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

To all people who are asking whether the contest is rated: check the tags.

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

del

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

The increase of the legendary word.

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

Hope problem statements are understandable easily and the contest will enjoyable.

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

I'm one point below div 1. So to me seems like a notorious coincidence

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

    I hope you don't lose points in this contest otherwise it won't be a NOTORIOUS coincidence.

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

    Had the same situation few rounds ago, but was 5 points far from div1 :D

    The rest of the story isn't really cool xD

    Wish you good luck ^^

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

I hope the difficulty of problems decreases gradually. In the last few contests, I have noticed a massive decrease in the number of submissions for the last two problems. The image shows one such contest. Note the actual number of submissions during the contest were quite less than that in the image. The same thing happened in yesterday's cook off on codechef.

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

Oh, God why?

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

Scoring distribution?

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

delayed :P

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

Delays, classic

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

Wait for 10 minutes more :(

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

Looks like they wanted the total registrations to reach 7k :P

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

this delay means a lot of inqueue :(

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

Thanks for the delay. I've just noticed that I didn't register for the contest before the delay.

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

Please, no more delays.

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

очень обидно что во время прохождения, просто выбросили. Зарегистрировалась, отправила 1 задачу, а на второй пишут что надо зарегистрироваться? это как???

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

    Вы зарегистрированы на раунд. Проверьте, что вы вошли в свой аккаунт.

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

How to solve Div2 B Nikita And Strings.i didnt' able to solve it plzz help

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

    my solution is to write two nested loops with the end of the first part and the begin of the third part and maximize your solution and you can calculate the length of the final string with pre-calculations in O(1)

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

    brute force for 2 points to split the string into 3 parts..

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

      That gives TLE? I did same thing and got TLE

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

        yes, it will give TLE if you use any further loop inside 2 nested loops to iterate the string. you can use the 2nd loop to count the frequency of 'a' and 'b' at 2nd and 3rd part of the string. see my code.

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

Can anyone explain the problem 3? It seem simple but got WA.

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

    it didnt' seem simple to me

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

      I thought that we simply bomb n to 1, and then bomb 2 place.

      That would destroy all tanks.

      But got WA

      Can anyone exaplain why this is wrong?

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

        For example: if you bomb the 7th, tanks can move to 8, and they'll survive

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

        When you bomb N, and then N-1, some tanks from N-1 might move to N after bombing

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

          I thought according to the problem, tanks that are not in pos. 1 must move to n-1. So tanks in n-1 must all move to n-2.

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

    Problem C explanation :
    First drop bombs on even numbered cells, then on odd numbered cells, then again on even numbered cells(1-indexing). My solution 31644671

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

      we simply bomb n to 1, and then bomb 2 place.

      That would destroy all tanks. Can u explain why this got WA

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

    Put bombs first on all even number positions, then odd number positions and finally even number positions. In this way we can make sure every tank is put bombs exactly twice.

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

How to solve B ??

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

was O(N*M*2*log(n*m)*8) too much for D

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

How to solve C ?

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

    I had the following logic : - Bomb all even cells. Now all tanks are on odd cells - Bomb all odd cells. All (intial) even cells are destroyed. All odd cells are on even cells - Bomb all even cells.

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

How to solve D?

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

    I did bfs after putting all empty cells in set rowwise and column wise and deleting cells from set after pushing in bfs queue but got TLE on test 6

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

What was A's hack ?

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

Does this problem have a logN per query solution? :

ask for number of occurences of x in range l,r

update range l,r by some d

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

A was clearly the hardest problem, as I didn't really understand the following sentence. :(

"It is known, that problem is from this contest iff its name contains one of Alex's friends' name exactly once."

So I made two submissions, both of which are incorrect but passed pretests. :P

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

Why in D grid is 1000 x 1000 (when time limit is 2 sec), it is too big for slower languages. Why not 500 x 500?

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

    nmk solutions can pass then

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

      If k is big enough then it wouldn't pass 500 x 500? Look there are no solutions with Python nor PyPy, and my Perl solution O(nm) was too slow too :(

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

E was just a tree version of http://www.spoj.com/problems/LITE/

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

Anyone can tell me how they did C? I did a recurrence but I got WA. if its odd then hit the middle one, then recursively destroy (i, mid-1) and (mid+1, j). If even then if mid=floor(n/2) destroy (i,mid) then destroy (mid+1, j) then hit mid. Anyone sees why this is wrong or what the correct answer is?

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

    I destroyed all even first. Then all odd. Then all even again. Passed Pretests. I dont know about sys tests.

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

    it isn't really a recursive structure since after hitting mid, you leave a guy with 1 health on mid-1 or mid+1, but all the other guys have health 2

  • »
    »
    7 лет назад, # ^ |
      Проголосовать: нравится -13 Проголосовать: не нравится
    1. Hit the even indices
    2. Hit the odd indices
    3. Hit the even indices

    Then you'll get a plan with n + n/2 steps

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

    I had same mistake. I used almost the same solution.

    This solution definitely constructive a valid answer, but not in minimum number of bombs needed. I believe it fails when there is a configuration where some element appears once. Just check answer when N = 10.

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

Is the intented solution for F O(NsqrtN), and if it is, why are solutions with that complexity getting a TLE?

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

hack for A-> DDanilanil :)

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

    Some other people forgot to check if the name does not appear more than once in the problem name. Simple hack : AnnAnn but your case is more tricky like AAnnnn since some people removes the first occurrence of the name and then recheck if it is in there one more time.

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

How to solve F?

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

Can't D be done in O(n*m)? I see a lot of O(n*m*k) solutions passing pretests.

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

Any corner case for Div2 B ?

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

Can't D be done in O(n*m)? I see a lot of solutions with complexity O(n*m*k) passing pretests.

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

    Carefully observe the 'break' statement and calculate the complexity.

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

      No, I noticed pure O(n*m*k) solutions without any break statements passing the pretests.

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

        I have passed the pretests without any break (see 31647369). However, I got AC after using breaks (31658960), but I do not think I should have gotten AC on a solution of O(nmk).

        I think that my solution would TLE on a test of the form below. The answer is -1.

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

          I got TL on such test and I really don't understand why your solution got AC. That's mine — 31650304. It seems to me that they are equal to each other.

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

            Your source code has the break (actually return 0) when you pop (x2, y2) from the queue. My source breaks a little earlier, when (x2, y2) is pushed into the queue.

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

              Yeah! Thanks a lot! Actually, I have noticed it a minute ago too. Then, the question why your solution works faster then mine? Difference ~ 500 ms. Because of using vectors? 31661871

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

What should be the output for this in problem A : "DanilDanilOlya"

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

    NO

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

      but the question said, it will be "YES" if ANY ONE OF THE FRIENDS come exactly once.. Little confused, if exactly one of the friends should come exactly once, or any one of them should come exactly once !?!?

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

        The last sample helps to understand which of them is true, doesn't it?

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

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

How to Solve C ?

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

Ended up only solving D. A failed at systest because of stupid sizetype being unsigned(so 1-2=2^32-1 which isn't <1), B failed because i stopped searching for more As/Bs after finding B/A, while D was easy BFS(at least for me). I don't understand how did such a small amount of people solve D.

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

Codeforces HACK round #442 (Div. 2)

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

If someone would be kind enough to tell me what went wrong with my E submission ( http://codeforces.com/contest/877/submission/31648193 ). Thanks

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

Is there something wrong with codeforces's servers ???

I have submitted the same code 3 times and each time I got run time error even though I didn't change anything in the code.

Can someone tell me why 31659189 solution is giving runtime error ?

My idea is to turn the tree to an array and then turn this array into sqrt(n) Buckets and then preform the queries on them to get a n * sqrt(n) solution

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

can anybody plz tell me how to solve div2 E.

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

Can anyone explain me why? 31638541

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

oh boy!

I got WA on D test 31

I used a simple BFS too and can't find any bugs in my code or algorithm

could sb help me with it :'(

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

    same here

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

    You have to maintain visited array for all the 4 sides, mine code also failed due to this but now it passed by maintaining the above information :(

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

      Do you have any case to prove this?, I haven't been able to come up with a case that makes fail my submission. And test 31 is too large :'(

      EDIT: I found the case.

      7 14 14
      XXXXXXXX..XXXX
      XXXXXXX...XXXX
      XXXXXX..X.XXXX
      XXXXX.....XXXX
      XXXX..X...XXXX
      XXXXXXXXX.XXXX
      XXXXXXXXX.XXXX
      1 9 7 10
      

      the visit order may be the cause. So you need to memorize the direction too, seen[f][c][d] and that should fix it.

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

      Well, used 4 ifs instead :P

      dirtyProgramming !

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

Can somebody tell why this code gave WA for case 49 — http://codeforces.com/contest/877/submission/31647784 in problem D?

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

Suppose if I have a map of size 4 in Div2 C: and I go with the sequence : 2 1 4 3 2 What's wrong with this? Aren't all the tanks damaged after following this sequence? Please Help!

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

could somebody plz tell me why this simple bfs code fails on test 31 http://ide.geeksforgeeks.org/5QUsiv Thanks.

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

    It failed due to the break part in the 60th line. Supose you are in position xi, yi and you are going downwards. Now you are checking (xi+i,y) but this was already visited. Just because you have previously visited (xi+i,y) you cannot assume that the next cell (xi+i+1,y) (or any of the next reachable cells) is also visited, hence the break is incorrect. And without the break you get TLE.

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

Livace do you hate me? I'm in top 5 div1 :(

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

I solved B by the DP method. I tried to find the largest "increasing" subsequence. Wrong answer 15. Can anybody prove why my decision is wrong? My solve: 31644137

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

The problems were cool, but the pretests were really annoying since they actually didn't contain anything important (like tests 48 & 49 for D).

Only 2 D's from my room passed system testing. Out of 14!

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

In the Problem statement for C it was given that If we drop a bomb on the tank in nth cell then the tank will be half damaged and will move to (n-1)th cell.So if we start dropping bombs from nth cell and and go on until first and then in the very last we drop bomb on 2nd then it gives answer (n+1).

for example say we have n=3. So at first we have a configuration 1 2 3. After dropping the first bomb on third cell--> 1 23 _ (3rd tank moved to 2nd cell and half damaged) After dropping the 2nd bomb on 2nd cell --> 12 _ _ (3rd tank is completely destroyed and 2nd is half damaged and moved 1st cell) After dropping the 3rd bomb on 1st cell --> _ 1 _ (2nd tank is completely destroyed and 1st tank is moved to 2nd cell)

This is true for any number of cell.

Have I misunderstood something? I can't also see that problem now as the problem page is showing a error saying "Oops! Something broke on Codeforces. Do not panic. You can try to reload the page or go back to the main page . We already read the megabytes of logs, solving the problem."

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

After I saw that contest will be only 2 hours long, when 6 problems, I thought maybe contest should be longer. Now I think that contest surely should be longer! Because three problems A, B, D are really tricky so interesting to hack.

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

I feel like I've seen problem E before...

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

I have a question about div2 D.

Here is the statement of concern:

Problem Statement

Does this mean she can run UP to k or she has to run k unless she hits the edge/an obstacle? I assumed it meant she ran k, but my solution — 31656460 failed test case 5.

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

How should i understand div2 B correctly my friends? I thought a beautiful string is a string that can be cut into exactly 3 substrings described as in the problem. What did i do wrong? I can't even understand english nowadays!

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

    Substrings can be empty.

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

    I'm fought up at test 3 bbabbbaabbbb with my result is 6, while the correct answer is 9. How can i produce a substring with 3 (may-empty) parts that part 1 and 3 contain only 'a' and part 2 contains only 'b'? Really in this case i just can see the result are abbbaa or aabbbb and nothing left!

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

in problem B can anyone please explain where my approach is wrong.

I first created blocks of a's and b's with their respective counts and then i consider the current block is the middle element and if it is 'b' then left and right part could be anything (i.e. bba, bbb, aba, abb) and if current block is 'a' then (aaa, aab, baa) and find the maximum among these (to do this i just calculate the total 'a' and 'b' in the left and right substring respectively).

code : http://codeforces.com/contest/877/submission/31666767

please help me where i am wrong !

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

Problem F Why unordered_map is even slower than map? Both TLE on test 11

unordered_map use 1450ms on test 10 map use only 576ms array use 249ms on test 10

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

31659292 877B - Никита и строка Hey can somebody help me find out what is wrong with my solution to B — Nikita and String. I got wrong answer in test case 37. Thanks.

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

    It's easy to see. You did not consider the case when the string contains only a's.

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

In div2 D, what ever i do, i always get MLE at test case 5 with this solution:31687090 .why? How can i fix it?

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

Where Can I find Tutorials ?

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

anyone can help to explain why in second sample case for problem C. Slava and tanks can destroy all the tanks? The solution doesn't drop a bomb in 4th cell.

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