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

И снова привет!

VK Cup 2021 - Финальный раунд (Engine) начнётся совсем скоро: в 22.08.2021 15:05 (Московское время). В финале примут участие 32 лучших участника отборочного раунда, которые разыграют между собой солидные призы:

  • 1-е место — 300 000 рублей;
  • 2-е — 250 000;
  • 3-е — 150 000;
  • 4-е — 100 000;
  • 5-е — 80 000;
  • 6-е — 30 000;
  • и 7-е — 20 000.

Следить за ходом соревнования и болеть за любимых участников можно будет по этой ссылке. Также смотрите прямую трансляцию в сообществе Команды ВКонтакте (нет, спойлеров к задачам финала не будет).

Всех остальных, кроме финалистов VK Cup 2021, мы приглашаем на Codeforces Round 740 (Div. 1, основан на VK Cup 2021 - Финал (Engine)) и Codeforces Round 740 (Div. 2, основан на VK Cup 2021 - Финал (Engine)), которые начнутся на пару дней позже: во 24.08.2021 17:35 (Московское время). Раунды будут рейтинговыми для всех.

Все задачи были придуманы и подготовлены мной. Большое спасибо всем, без кого этот раунд не смог бы состояться: KAN, PavelKunyavskiy, scott_wu, xiaowuc1, Monogon, Aleks5d, lperovskaya, MikeMirzayanov. Отдельное спасибо s-quark (2-е место первого в истории VK Cup 2012!) за вдохновение для названий задач.

Участникам в обоих дивизионах будет предложено 6 задач и 2 часа 30 минут на их решение. Рекомендуем прочитать условия всех задач. Удачи!

UPD: Распределение баллов в финале VK Cup: 500 — 1250 — 1500 — 2000 — 3000 — 3500

UPD2: Поздравляем победителей финала VK Cup 2021!

  1. never_giveup
  2. Maksim1744
  3. Um_nik
  4. SpyCheese
  5. budalnik
  6. vepifanov
  7. Golovanov399

UPD3: В первом дивизионе участникам будет предложен набор задач финала VK Cup 2021 без изменений.

Распределение баллов для первого дивизиона: 500 — 1250 — 1500 — 2000 — 3000 — 3500

Во втором дивизионе задачи BDEF будут совпадать с задачами ABCD первого дивизиона. Задачи A и C второго дивизиона будут похожи на задачи F и E первого дивизиона (но, конечно же, будут гораздо проще). Кроме того, для задачи D второго дивизиона добавлена подзадача с меньшими ограничениями, чем в оригинальной задаче.

Распределение баллов для второго дивизиона: 500 — 1250 — 1250 — (1500 + 1000) — 2500 — 3500

Напоминаю, что таблица результатов финала VK Cup доступна по этой ссылке — можете попробовать получить конкурентное преимущество, используя всю данную информацию до начала контеста :)

UPD4: Выложен разбор задач на английском языке.

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

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

another great round is coming :)

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

Amazing round!

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

Good luck

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

Going

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

orz

»
3 года назад, # |
  Проголосовать: нравится +41 Проголосовать: не нравится
What's Special
»
3 года назад, # |
Rev. 2   Проголосовать: нравится -31 Проголосовать: не нравится

Problem C of last two rounds made by tourist can be solved using binary search so what are the odds that this time also it's gonna be binary search. As he is on hattrick.. Binary_Tourist

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

tourist rounds are always great! Very excited to participate this round!

Sorry for disturbing tourist :(

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

Making rounds based on some contest that has been held 2-3 days before, carries the risk of problem leakage. We do have seen such instances in the past when people submitted the first three problems in such minimal time which wasn't even enough to read them.

If someone finds this wrong then feel free to comment. This is only my personal opinion and I think that fair competition is not possible in such cases because some people get an unfair advantage.

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

    If I am saying something wrong then feel free to rectify it.

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

    There is no obligation to participate.

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

    This round was the Vk cup final. And all the contestants of this round were GM or above, also they're very well known in CF.

    It's highly unlikely that they would leak problems or cheat.

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

      Rounds that were based on many other contests have witnessed the same thing I am talking about. Not particularly with this round but there have been contests(based on some Random Olympiad) in the past in which the same thing happened as stated above.

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

    First of all, most of the participants of the final round of this VK cup have written contests for CODEFORCES before. So I think they will respect other contests, if not then the same thing could happen to their contest(by testers or whatever else) and that, of course, is not what an author would want.

    What you mentioned is correct, but that round was not based on the final round of another contest, if I'm not wrong it was based on an elimination round.

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

    What you have seen are virtual participants, which are not rated(they joined the contests after it finished).

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

Hopeforces...

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

Hello again! = excitement again! :D

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

I see that viewing this list has revealed the level of problems in div1

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

    How do you propose to win using this information?

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

      First, you must analyze the level and skills of each participant in this list and find out the favorite and non-favorite topics of each of them.

      Then you put some questions and answer them:

      • Why couldn't eatmore and receed solve the problem C? Although eatmore managed to solve both problems D and E.
      • Why couldn't 244mhq and Egor and KostasKostil solve the problem D? Although they managed to solve problem E.
      • Why did Endagorion and Petr solve only 3 problems?
      • Why was no all "Legendary Grandmaster" racer able to solve the last problem? Only never_giveup and Maksim1744 managed to solve it.
      • There are a lot of questions too!

      After answering all these questions and looking at the old tourist Contests, you can guess the topics of the problems and prepare for them well and develop an appropriate plan for this Contest!

      good luck for everyone!

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

        Wow, that's a lot of notifications.

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

        (⊙.⊙(☉ₒ☉)⊙.⊙)

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

        You spend way too much effort on this for it to be a joking post. See you in top 5 then.

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

        It's simple: my cat walked on the keyboard and wrote a solution to problem E. I tried to persuade her to write D as well, but she was unshakable.

        P.S. Yes, as you can see from the score I have, solution was correct not on the first attempt. Even cats sometimes make mistakes.

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

          I need your cat tomorrow, don't worry about the food, it's on me.

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

          i need your cat as a personal coach for mine, as my cat skills can solve max C div2 and want to develop. edit: it will pay with tuna.

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

      Ormlis Congratulations for the Nutella, sounds like you managed to use the information :D

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

2000+ upvotes easily

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

My screencast (will become available after the round 740)

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

The score distribution is for both Div1 and Div2?

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

Has anyone noticed that the winner never_giveup was the last qualified person (Rank 32) of the elimination round! Congratulations for never giving up :)

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

Молодец Toursit

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

Good luck to everyone!

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

I desperately want my contribution to be the lowest on this website,so please,do not give me any upvotes,I am begging you:)

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

First place winner is never_giveup .. hmmm I feel this is a sign )':

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

I'll never give up <3

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

never_giveup's nick should have been 'never_gonna_give_you_up' to rickroll the standings!

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

Since this round is prepared by tourist, you might as well check out some of his tips on competitive programming. link

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

We love the earth :)

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

LOL .. I thought the fanart image of the VK Cup was loading wrong in my screen :')

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

Won't be able to solve any problem! Still participating :)

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

Good luck to everyone!

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

i can be wrong but Problem A statement is some how confusing for me (:

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

The problem statements are terrible!

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

I feel so dumb.

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

How to solve Div1D?

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

    Notice that the insertions put the following restriction on the final sorted array: for some positions $$$k$$$ and $$$k+1$$$ the values strictly differ $$$a_{k} < a_{k+1}$$$. For all other positions, the values might be equal. You have to count the number of such positions because if several insertions happen in the same place, they all contribute to a single restriction. To do so, you can track the current "strict" positions with a treap (it will allow you to increment positions for a suffix).

    Given the number of restrictions, let's look at the differences between subsequent elements. Add a 1 to the very beginning of the array and $$$n$$$ at the very end for simplicity. It's easy to see that for positions with restrictions the differences have to be at least 1, for other positions -- at least 0. In total, they should sum up to $$$n-1$$$, as the final element is now $$$n$$$ and the first is $$$1$$$. So, you have to divide $$$n-1-N_{restrictions}$$$ 1-point-differences between $$$n+1$$$ positions. By subtracting $$$N_{restrictions}$$$ we account for the "strict" positions. It is just a binomial coefficient.

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

      Damn, I think I got the second part, but I could not figure out how to find the strict positions. I guess I gotta learn treaps now.

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

      Ohh, I got the part after the calculation of those special points, but I am surprised that it involved treaps.

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

        Can be solved with segment trees, but using a treap is more straightforward here (find X, insert X, add 1 on the range).

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

        If you go backwards, you can get away with a Fenwick tree. All you need is point updates (subtract 1), queries, and lower_bound.

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

how do you solve B?

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

    Find the minimum number of breaks (let this be $$$x$$$). Now, every swap between A winning and B winning in will increase the number of breaks by 2 (because in the min. number of breaks, either all of A's wins are B's serves or all of B's wins are A's serves). So, we can reach everything in the sequence $$$x, x + 2, ... x + 2k$$$ breaks, where $$$k$$$ is the number of swaps we can make. You need to repeat this for both serving sequences ($$$ABABA$$$ or $$$BABAB$$$).

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

      There's an easier way around (IMO at least). Fix number of breaks A scores, for every $$$0 < i \leq a$$$. Now we can uniquely determine the number of breaks B possibly scored, because we know the total number of games A served, B served, A kept the serve, A lost the serve and B lost the serve. So just check for every combination if it's possible (total number of wins matches and no player won/lost negative number of times either by keeping their serve or breaking) and insert it into a set. Just print the output afterwards.

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

    Fix a K = total number of breaks._ Let K1 = number of breaks for Alice and K2 = number of breaks for Bob. Naturally, we have K1 + K2 = K. Now consider two cases: 1) The total number of games (a.k.a, a + b) is even: we know that the number of games where Alice serves the ball (call it HomeA) should be equal to the number of games where Bob serves the ball (call it HomeB)

    HomeA = HomeB
    a - k1 + k2 = b - k2 + k1
    a - b = 2 x k1 - 2 x k2
    k1 - k2 = (a - b) / 2
    

    and you also have k1 + k2 = K, so you could solve these. If k1 or k2 is negative or greater than a and b respectively, then the fixed value of K is invalid. 2) When a + b is odd, you could do the same work but this time, HomeA + j = HomeB where j = {1, -1}

    That is how I solved it not sure if there is an easier way to be fair.

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

    Consider a table

                 A serve  B serve  Total win
    A win        aa       ab       a (given)
    B win        ba       bb       b (given)
    Total serve  count_a  count_b       
    
    if a+b is even:
       count_a = count_b = (a+b)/2
    
    if a+b is odd: consider two cases
       count_a = (a+b+1)/2, count_b = (a+b-1)/2 
       count_a = (a+b-1)/2, count_b = (a+b+1)/2
    
    
    • You consider all possible values of aa which is between 0 to count_a inclusive.
    • For each possible value of aa, you can fill out the rest of the matrix like how you fill up a Sudoku.
    • The assignment is valid if all four entries are non-negative.
    • For each valid assignment, add k = ab + ba to the result
    • If a+b is odd, you consider the two possible set of values count_a and count_b could have.
»
3 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

B is harder than D for me and I waste a lot of time on it :(

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

how to solve C?

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

    i did binary search

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

      how do you sort the input array(caves)?

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

        They can be sorted by the max value of $$$a[i][j] - j$$$.

        UPD:

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

    First of all, you have to find maximum one for every group. While finding maximum our heroes power should be at least:

    armor of monster — index of monster.

    after this, you should sort values of maximums and start from minimum one. if maximum in this group is bigger than answer increase answer

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

C was easier than B for me

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

How to solve the bigger constraint for D? I feel blank :(

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

    Mark multiples instead of checking factors. At a position $$$x$$$ for a given multiple $$$k$$$, we want to add $$$ans_{x}$$$ to all possible $$$y$$$ where $$$x = \lfloor \frac{y}{k} \rfloor$$$. This is just the range $$$[x \times k, (x + 1) \times k - 1]$$$. We can mark this range using a difference array by adding $$$ans_{x}$$$ to $$$diff_{x \times k}$$$ and subtracting it from $$$diff_{(x + 1) \times k}$$$.

    Now when we arrive at a pos $$$y$$$ we add $$$diff_{y - 1}$$$ to $$$diff_{y}$$$ to get the corresponding value added using multiples. Now we just add this to $$$ans_{y}$$$.

    Total complexity is $$$O(1)$$$ per multiple, so $$$O(n logn)$$$ total.

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

      I did the same thing but used a Fenwick Tree. Unfortunately, it TLEs. Maybe $$$O(nlognlogn)$$$ is not intended to pass.

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

        I suspect that is the case. Fenwick Trees are fast, but almost 2e8 operations on it feels like far too much. And anyway, it can be implemented using a simple array since we only update $$$y > x$$$ for a given x.

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

        I feel you :( I was convinced it's right approach just to see TLE test 7.

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

I get that the constraints for Div1B were probably in an attempt to exclude $$$O(n^{3/2})$$$ solutions, but... seriously?

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

    $$$n=4*10^6$$$ was too large for $$$O(n^{3/2})$$$. Soln I wrote gets tle for $$$4*10^5$$$.
    Regarding memory constraint, to me, it seems it was to stop precomputations of all factors of numbers using $$$O(nlogn)$$$ sieve.
    But still, it was imo a bad attempt since one can just compute all factors on the go using prime factorization.

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

Total shot in the dark, but is Div1D somewhere along these lines? Consider an initial array $$$a_i = i$$$. Perform the $$$m$$$ specified swaps. Let there be $$$x$$$ positions, where $$$a_i > a_{i + 1}$$$, the answer is something like $$$2n - x - 1 \choose n - x - 1$$$.

Ik its probs wrong, I have no proof for this at all, just intuition + guesswork, and no way to calculate this independently of $$$n$$$ (something related to at most $$$2m$$$ possible segments to check maybe?)

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

    Yes, that's what I did.

    To calculate x, you can go backwards through the swaps, keeping track of the remaining indices with a BIT.

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

      Oof, I thought of using a BIT somehow but didn't think of going backwards, though it seems obviously easier now that you mentioned it. Thanks!

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

I don't know if it's me but the problems seemed pretty difficult compared to other Div 2s. Seems I have a lot to work on.

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

    B was a slightly more difficult than normal, but D was miles easier than usual. You get something — you lose something. :P

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

Can anybody plz mention any edge case for C for which my program is giving WA?

My Program:

#include <bits/stdc++.h>
using namespace std;

#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define fori(from, to) for(i=from; i<to; ++i)
#define forj(from, to) for(j=from; j<to; ++j)
typedef long long int ll;

int main()
{
	fastio; ll T; cin >> T;
	
	while(T--)
	{
		ll caves, i, j; cin>>caves;
		
		vector<pair<ll, ll>> vres; 
		
		fori(0, caves)
		{
			
		    ll monsters; cin>>monsters; vector<ll> vmon(monsters);
		    forj(0, monsters) cin>>vmon[j];
		    
		    ll maxval=INT_MIN;
		    forj(0, monsters)
		        maxval=max(maxval, vmon[j]-(j+1-2)); //finding the starting strength for every cave

		    vres.push_back(make_pair(maxval, monsters)); //maintaining a vector of pairs : starting stength for a cave || no.of monsters in that cave
		}
		
		sort(vres.begin(), vres.end());
		
		fori(0, caves)
		{
		    ll temp=vres[i].first+vres[i].second;
		    bool flag=true;
		    forj(0, caves)
		    {
		        if(i==j) continue;
		        if(temp<vres[j].first) {flag=false; break;}
		        temp+=vres[j].second;
		    }
		    if(flag) break;
		}
		
		cout<<vres[i].first<<"\n";
	}
	return 0;
}
  • »
    »
    3 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

    the distance between the max value and the entrance of the cave matters, you can't just sort by max value

    add spoilers to your code as well

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

how to solve problem A ?

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

Div2 B was a nightmare for me.

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

its perfect time for cf to evolve since a lot of people are now solving c, this round was awesome

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

I accidentally submitted Div1B two times: 126856468, 126857306. The first submission was from the main site, but the page did not respond for quite a long time and I thought that CF is down. The second one was from m1.codeforces.com. The code is completely identical, so is it possible to return back -50 points for the "ignored" submission as it shouldn't have happened if not for some lags? CC MikeMirzayanov

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

Is there a stream to explain the solution to the problems?I'm waiting for it.

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

Really great problems! I liked div 1 C and D (even though I wasn't able to solve D during the contest).

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

So were there no hacks today? And that's so good about today.

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

C was way easier than B... I feel so dumb. This was my best chance to become specialist for the first time and I lost it.. T_T

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

Wow, it seems like 4 out of the top 5 of div 2 are alt accounts :v

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

I was getting MLE on test 7 in Div2 D2, I wonder if I should have have locked my D1 and looked into the submissions of D1 which were failing on D2 due to TLE but not MLE, I might have solved D2 then lol, but time remaining was very less.

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

Any ideas on how to solve Div1 E?

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

D1 and D2 were tricky

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

Ratings updated preliminarily. We will remove cheaters and update the ratings again soon!

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

    Hey,it so happened that my solution to problem C matches quite a lot with the one by another user. However, the code I submitted and the solution idea were completely mine and I hadn't taken help of even any online source (let alone copying someone's solution.) Also, regarding the ide part,I use codechef ide to code my solutions and those can only be viewed by signing in to my codechef account,so there was no leakage of code from my side atleast. Also,my solution was pretty basic and short ,so there is a high chance that it matches with someone else's code. The message I received said that if I have a conclusive evidence that the coincidence could have occured due to using some code published online before the contest,I can post those details as a comment to this post...but since, I hadn't used any online source to write my code, I have no idea how to prove my honesty except for the fact that the solution was too basic. I can also completely explain my solution if required. Also,due to this my rating was rolled back and this hurts even more since this was my best contest till now and I had crossed 1800 for the first time but now,I feel that I have been deprived of those rating points despite no fault of mine. So, I humbly request you to consider my participation in this contest valid and grant me the delta I deserved.

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

    It seems that you've removed some of the cheaters.But why haven't the ratings updated again yet?

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

+1 upvote for this wonderful round !

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

Can anyone explain how to do D1? I am not able to understand

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

Can div2 D be solved using segment trees? if yes. please can anyone help me with the approach!

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

    Yes, I upsolved Div2 D1 problem using lazy segment tree implementation from the atcoder library:

    Spoiler

    The lazysegtree header file can be copy/pasted into the source code. It's fast enough for D1 126922899, but fails with TLE on D2 126922883. I need to check the editorial to see if anything can be improved or it's a dead end.

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

Can anyone help me with a weird issue that I faced after the div2C main tests.

This was my submission which passed the pretests during contest : 126871707. However, It got runtime error on test 13 which I was not able to figure out why.

I randomly removed the custom comparator function used in sorting and it got accepted : 126911540. Can anyone help me understand what went wrong in that comparator function? According to given input data, every vector should have at least one element.

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

Last tourist round, I lost pupil, this time I gained it back :D

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

is this round unrated for div1 participants? because ratings hasn't rolled back yet!

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

Hello , I am pretty sure that there is a mistake in engine check , please check those 2 solutions for problem C — Deep Down Below: this is my last submission in the contest : http://codeforces.com/contest/1561/submission/126904661

and this is the exact code except that i removed the compare function passed to sort , which actually does exactly the same as sort except when pair.first == pair.second , i choose the cave with more monsters , and this should not affect the solution : http://codeforces.com/contest/1561/submission/126961415

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

    Actually it can influence.

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

    A C++ comparator should return false when elements are equal, otherwise you can get a number of different verdicts (RE, TLE, WA and sometimes even MLE). (should be a.second > b.second, not a.second >= b.second)

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

MikeMirzayanov Today,I got a message from system whose first few words were- "Your solution 126867937 for the problem 1561C significantly coincides with solutions ultizet/126864317, dumb_boi/126867937." I would like to clarify that I use codechef ide to code my solutions and that code can only be viewed by signing in to my codechef account. Also,my code was pretty basic and I hadn't taken help of any online resource to come up with the solution idea or code or anything. The message said that I must post my clarifications as a comment to this post. Also,since the code was solely mine,I don't have any evidence of any online resource which i 'might have' used(simply because i didn't use any) ,so I don't know how to prove my honesty except for the fact that the problem was pretty basic and there as a high chance that 2 solutions match coincidentally. Also,my ratings were rolled back. This hurts as this contest was my best contest till now and I had crossed 1800 for the first time :( . Now, it hurts knowing that I might not get those rating points despite no fault of mine.

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

    I haven't recieved any reply from codeforces yet...maybe i didn't post my clarification where I was supposed to...can someone help? Do I have to post it as a seperate blog post or something?

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

When will the points for div 1 be restored?

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

Is it unrated? /fn/fn

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

Yay the points for Div 1 are rebalanced and back!

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

After I entered this div,I become purple.But for the roll back,the next div2 I get unrated? Can it be solved?

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

tourist Why only 3 problems (A, C and D1) from the contest are put in practice section? When will remaining problems be posted? I mean in problemset section.

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

    All the problems are available in the problemset section, the problems from Div. 1 are just a bit further down the list.