Vladosiya's blog

By Vladosiya, 3 years ago, translation, In English

Hello! Codeforces Round 762 (Div. 3) will start at Dec/20/2021 17:35 (Moscow time). You will be offered 7-8 problems with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating of 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ACM-ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks.

You will be given 7-8 problems and 2 hours and 15 minutes to solve them.

Note that the penalty for the wrong submission in this round (and the following Div. 3 rounds) is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

take part in at least five rated rounds (and solve at least one problem in each of them), do not have a point of 1900 or higher in the rating. Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

Thanks to MikeMirzayanov for the platform, help with ideas for problems and for coordination of our work. Problems have been created and written by ITMO University teams: MikeMirzayanov, MisterGu, myav, Gol_D, Aris, senjougaharin, me Vladosiya and SGU student Brovko.

Also many thanks to Geothermal, Rafbill, Sugar_fan, mango_lassi, hitonanode, Resende, Igorjan94, CtrlAlt, KerakTelor, FlakeLCR, MatheusMonteiro, Loolo, kocko for testing the contest and valuable feedback.

Good luck!

UPD 1: The opinion of the testers about the order of problems turned out to be so heterogeneous that there is no way to be sure about the increase in the complexity of problems in the set. We advise you to read all problems.

UPD 2: If you are a schoolchild from the Saratov region, then please refrain from participating in the round. One of the problems may be familiar to you. Thanks!

UPD 3: Editorial

  • Vote: I like it
  • +296
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it -41 Vote: I do not like it

Hope the round is not full of problems based on observations only, also I have a question for everyone, how are observations that are in CP problems relevant for any real life problem, cause I suck at observations, and even after solving many problems I am not getting any better, I am on the verge of quitting programming, please I need help.

Hope for a great round!

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

    Hope the next football match doesn't have much kicking the ball, also I have a question for everyone, how is kicking the ball in football relevant for any real life problem?

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

      Yeah, no kicking football next match, just kick the players instead :hype:

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

wow, no responses only downvotes, looks like people these days are only competitors not helpers :(

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

    Maybe spend more time observing :/

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

    I mean, you were asking for problems to not have observations (which is the only part of the problem you have to think). Its pretty reasonable to downvote

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

First time, registered in Div3 as "out of competition". ^_^
GL & HF

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

    The round will be rated for 1600- only or for all who "do not have a point of 1900 or higher in the rating" too?

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

      If you have 1600 or more rating right now, it will be unrated for you

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

        I have 1173 rating, still after solving 4 questions why it was showing unrated for me. Any idea?

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

          Me too! I have only 1016 rating now. But it's still showing unrated.

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

Can codechef and codeforces co-ordinate together and one of them shift the date for their 29th dec contest to 30th or 31st dec to avoid a clash?

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

    I guess that will be unfair, because problems are mostly same and somebody could participate at the latter contest knowing most problems

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

      How mostly problem can be same, i don't get it.

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

Good luck everyone

»
3 years ago, # |
  Vote: I like it -7 Vote: I do not like it

I hope my rating increases this time

»
3 years ago, # |
  Vote: I like it -7 Vote: I do not like it

more you get more you wish .this is damn true in case of rating also.

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

I think many schoolchild from the Saratov region didn't plan to participate until they see UPD2

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

**Hope we all get positive rank **

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

    we all hope that but it isn't possible.

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

      everybody can get a positive rank since nobody can be the #0th or the #-1st or lower ;)

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

MNNIT Insomnia has been postponed to start from 10 PM IST. Those who wanted to give the contest can now join in after CF Div3.

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

PS: The opinion of the testers about the order of problems turned out to be so heterogeneous.

"Read all problems".

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

Frequent Div.3 are love..

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

imagine swapping n and m in D

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

The hardest Div3 I have ever seen before :(

»
3 years ago, # |
Rev. 3   Vote: I like it -52 Vote: I do not like it

.

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

    And why ?

    The problems are fairly interesting especially from D to G although F is easier than what it's position suggests

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

    why? it's quite interesting. you didn't even solve any problem.

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

Is G DSU and binary search or something else ?

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

    exactly

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

      I was trying to do the same maybe my checking condition is incorrect

      Thanks

      Edit: Found the error

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

      Its funny how I solved 2 similar Gs before today but ended up trying to think of a BFS solution because of "minimum". I think its due to solving many BFS problems lately. Does this happen to you?

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

    I have an intuition for Dijkstra, not sure though. LOL

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

    Basically just finding SCCs in a fast way. Even DFS works.

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

      bestial-42-centroids Can you explain your solution, please? Always nice to see deque being used in a solution.

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

        Yes! The first idea is that we want to have some way to know which bombs will explode when another bomb explode. Let's see the explosion process as a graph in which a bomb is connected to another if they are at distance $$$\leq K$$$ and they share some coordinate (i.e they are on the same horizontal/vertical line). Let's consider each connected component. If a bomb from a connected component explodes, then all the bombs of the component will instantly explode. It is know clear that the bomb with the smallest timer of each component will give use the time it takes to explode the whole component !

        The question is now the following: how to find the components. For this let's sort all the bombs by increasing $$$x$$$ coordinates and iterate through the vector (in case of equality for $$$x$$$ we sort by increasing $$$y$$$). This way we can iterate through the bombs from left to right and for each vertical line we'll see the bombs from bottom to top. If a bomb $$$i$$$ is at the same $$$x$$$ than the bomb $$$i - 1$$$, they are on the same line and our processing order over $$$y$$$ guaranty that $$$i$$$ is the closest bomb if we walk to the top from $$$i - 1$$$. So we check if $$$i$$$ and $$$i - 1$$$ are at distance $$$\leq k$$$ and if so we add an edge between the two bombs (using a union find). We should also keep track of the minimum timer of each component.

        Now we know all the bomb components and the time they take to explode. We could use binary search to end the problem but we can also use some greedy algorithm ! Let's put all of this bomb in a sorted vector (in my code it's a deque because it makes implementation easier but you can also use a vector with two pointers).

        The strategy is the following: When manually exploding bombs components, we should explode the components with the biggest exploding time.

        Intuitive proof

        So the idea is to explode the component with the biggest timer and to update the time that has passed. I then use $$$pop_front$$$ to remove the bombs that exploded automatically while I exploded the biggest components manually.

        I hope my explanations were clear! If you have any questions, don't hesitate to ask

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

    My solution for G: Create a graph by connecting edges between two adjacent nodes such that either they have the same X and abs(diff(Y)) <= K or same Y and abs(diff(Y)) <= K. Each node will have maximum 4 edges. Find connected components and let the total components be T. For ith component, assign value i to all nodes in that component. Then, sort the vertices in order of increasing timer and go through them from 1 to N. At ith vertex, add its component value to a set S and update ans = min(ans, max(timer[i], T — size(S) — 1). That's it! Simple dfs.

    Accepted solution: 140115861

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

    Yeah couldn't implement since I kept trying to fix my segment tree solution to E that was getting TLE. Turns out if you use stack you can get $$$\mathcal O(n)$$$ implementation. The last few minutes of Div 3 are always a blur. :(

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

Couldn't think of D and went ahead to AC E instead.

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

    binary search the alpha. if each people have at least one shop to go and at least one shop can satisfy two people or more, then that alpha is OK.

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

      I've solved it with a greedy approach, if two persons are assigned to the same shop, the assigned friends must be the top 2 friends with maximum values for that shop, and the remaining friends are free to choose their shops.

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

        That's exactly what I did for D :D

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

        I think I did something similar. I calculated two values. The maximum of the second highest values for each shop, and the minimum value in each column (highest happiness any individual friend could achieve). Then I return the minimum of the two values.

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

Good round! I have no idea what is wrong with my code in E, its sadly. But i enjoyed this round

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

How to solve that D? Was able to solve till F but cant get my mid around D at all?

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

    Binary search on answer

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

    Ok so there are many ways to solve D but I think this is the easiest one: First, compute the shop with the maximum value of each friend.

    Let's call the set of the best shops $$$B$$$

    If $$$|B| \leq n - 1$$$ then the answer is the minimum of $$$B$$$ ($$$|B|$$$ denotes the size of the set $$$B$$$, i.e the number of distinct values in $$$B$$$).

    else, it is obvious that $$$|B| = n$$$ because we can have at most $$$n$$$ different best shops as there are $$$n$$$ friends.

    So we only need to remove one shop from $$$B$$$ to be able to buy all the gifts. This means that we need to:

    — pick two friends

    — assign them to the same shop (so at least one of the two friends will change it's shop)

    This way we will reduce $$$|B|$$$ by one (or more) and this is the minimal move we can do so if we pick an optimal move here then it'll give some optimal answer.

    So what we need to do is: — Iterate over the shop where we will place the two friends

    — Pick the two friends whose joy in this shop is maximum

    — Compute the changes on the answer and chmax

    Here is my code: https://mirror.codeforces.com/contest/1619/submission/140072358

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

Had similar stupid error in 4 problems... C: forgot to check if s % 100 >= 10 D: forgot to check if 1e9 is OK E: forgot the answer could be more than 32-bit integer G: when removing some debug code, deleted the line sorting the exploding time...

also think about H for 20 minutes without any idea.

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

Implementation Forces

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

OMG, AC problem E 1 minute after the contest ended. I can be at rank 200. what a pity T_T

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

    Hard luck.

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

    How can u be at rank 200 with such a very high penalty? :| My friend solved 5 and got rank 300 (official) with much lower penalty.

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

      How ?? The last person who solved 5 problems was ranked 28x. you should uncheck show unofficial or sth...

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

        bug_limit_exceeded got rank 280 (nearly 300). If you solve E, your penaly must be at least 87 higher than him (347 vs 260).

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

          I don't know why the rank on the friends list is different when I see it common standing

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

            The common standings does not include the non-rating contestants meanwhile the friends list standing does

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

Video editorial for anyone interested

P.S: HD quality should be available in few minutes

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

Thanks for very nice problem set
Missed F just by a minute :(

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

Could any one tell me that at what conditions would we get -1(i.e impossible case) in problem C

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

    a=1 s=20

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

    If it works, there is a unique B that satisfies A + B = S (where plus represents the modified addition operator).

    Why? Consider working in order through the indices of A and S in reverse. If the next_dig(S) >= next_dig(A), then the next required digit of B is just next_dig(B) = next_dig(S) — next_dig(A). Otherwise, we must consider the next two digits of S as the target number. If 0 <= next_two_digs(S) — next_dig(A) <= 9 then we have our next B digit. Otherwise, we fail and return -1.

    If we reach the end of A and S continues, we can extend A with leading 0s to determine the remaining B digits. However, if A continues further than S, we fail and return -1.

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

      I am making some mistake can you point it out - https://mirror.codeforces.com/contest/1619/submission/140078402

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

        Java looks like a very long code. But have you checked it dif can go negative at the line if(dif > 9). Because I faced similar issue twice but resolved when I did if(dif > 9 or dif <= 0) c ++ kind of implementation

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

        It's hard for me to debug by sight by I think your dif value is perhaps going below 0 and therefore you append "-1" to sb, which is later reversed. This is just a guess based on the error message at the bottom though.

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

      I was aware of next_two_digs(S) — next_dig(A) <= 9 but missed the condition 0 <= next_two_digs(S) — next_dig(A) in the contest time.... As a consequence C was not accepted in the contest :(

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

        Unlucky but don't lose heart. Things like this are a matter of experience — next time you will not make the same mistake: when checking if something is a digit, you will remember to check 0 <= dig <= 9.

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

        I got two WA for that and took lot of time to find that error. But it helps in debugging later tests

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

I dislike the weak example :)

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

Was the time complexity for E O(nlogn)? I had that, but I still TLE. I binary search for the element to "fill in" the gap, and I think others did as well when I click their submission. Does anyone know what part of my code is higher than O(nlogn)? https://mirror.codeforces.com/contest/1619/submission/140082257

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

well too much cheating going on , I know some may say to do hard work instead of talking about cheating but how can a newbie like me out perform cheaters who are doing better than a specialist, it is really becoming hard for us. guess we have to practice like an expert.

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

BinarySearchForces for me.

A really enjoyable problem set, although for a Div 3 possibly a little too hard.

I genuinely thought F < E < D. Maybe I just took a while to figure D out. On the surface it looks like quite an intimidating problem. And F my solution was so simple I was sure I must have misunderstood the question but it passed.

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

    In F there is some severe text understanding skills necessary.

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

      That's fair. Understanding the statement is probably more work than solving the problem.

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

    I think people just died on D, cuz they just read it reversed, thinking n is amount shops but rather not friends.

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

      Initially I coded a solution where you were allowed to visit M-1 shops (this is quite easy using prefix and suffix max arrays).

      The N-1 version initially seemed difficult to me because I was trying to optimally choose the best N-1 shops. Once you spot that all you need is at least one shop per person and at least one shop with 2 people for a given target value, it's easy. You firstly have to spot the binary search potential (not too hard) and secondly this non-trivial observation. For a Div 3D I thought it was quite tough, even once you understand the question correctly.

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

        The N-1 version initially seemed difficult to me because I was trying to optimally choose the best N-1 shops.

        True, this is what I would have done too. But kudos to the authors, samples catch this, and as a consequence, I am pretty satisfied with the quality of the samples in this contest.

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

          I think it's a great question. Just intriguing that different people find different things difficult.

          There's something psychological about it all as well. When I see that the solve numbers are into the hundreds quite early on, I know the method and/or data structure is not too complex, so I change my mindset around how to approach the problem. In this case I knew that there must be something easier than what I was trying, so I switched my efforts to figuring out what that was.

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

        You don't actually need binary search https://mirror.codeforces.com/blog/entry/98076?#comment-869474 altough it might help in the thinking process

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

        How was the observation non-trivial? Or is pigeonhole logic hard for a div 3D? I got the thought process pretty quickly but took a while implementing.

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

          Applying the pigeonhole principle is trivial. Observing that it’s the correct approach (rather than, e.g., bottom up selecting the N-1 stores), is non-trivial in the most literal possible sense. And indeed since it is not the only approach, it is absolutely non-trivial.

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

    I didn't read F because it looked long and I didn't have enough time (I lost a bunch of time on D because I swapped n and m...and I just had a hard time solving E) but I read G 5mn before the end and insta solved it so for me G < D < E :')

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

    Could you explain your approach for F please?

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

      In each turn, you must assign all N people to one of M tables. Suppose R = (N % M). Then R tables will have X = (N / M) + 1 people on them, (M - R) tables will have Y = (N / M) people on them.

      In the first round, assign the first R * X people to tables with X people (big tables), and the remaining people to tables with Y people (small tables). Store the index i_small of the first person at a small table in this round.

      In the next round, begin your assignment of people the big tables from i_small, and repeat the process.

      Why does this work? We're cycling through the guests from 1 to N in blocks of R * X. As such, no person is ever more than 2 big tables ahead of any other.

      (Note that in the case R = 0 all guests are always sat at small tables).

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

Does anyone know what I have done wrong in problem C https://mirror.codeforces.com/contest/1619/submission/140095282 Thanks a lot!

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

    if ((y % 100 - x % 10) > 18 || (y % 100 - x % 10) < 0) { cout << "-1\n"; return; } I think first one should be > 9 instead of 18 because of single digit say if y = 22 and x = 9 it will add 13 to the value which is incorrect

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

It's hard for me to solve these 8 problems in 2 hours.The duration is short.

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

I found code that goes against the rules. What should I do? https://mirror.codeforces.com/contest/1619/submission/140060952

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

    What is the person even trying to do? Copied some others code and pasted those whiles?

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

C was so cancer :( .

»
3 years ago, # |
  Vote: I like it -11 Vote: I do not like it

In today's problem C, i submitted my code(language: c++17) during the contest at 2:02 while the contest was still running, I got runtime error on test#1 but same code runs fine on changing language to c++17(64), I also ran same code on test#1 in atcoder compiler and it worked fine there

also when I add if(v2.size()>0) before this for loop for(ll i=v2.size()-1; i>=0; i--) { v3.pb(v2[i]); }
same code got accepted but this addition shouldn't matter.

link to runtime error code: 140087080 link to accepted code: 140095620

please look into this @MikeMirzayanov @Vladosiya

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

    vector.size() returns unsigned int, so when you do v2.size()-1, it will not be -1, it will be out of bound for the unsigned int. And that is why you are getting runtime error. Instead you can store v2.size() in an int variable before the for loop and use that variable in the for loop.

    And avoid tagging Mike and other coordinators. Your doubt is not a big issue that you are tagging them :)

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

      Just to be clear. C++ is completely ok with you subtracting 1 from an unsigned 0. But the result is 2^32 - 1 (in 32 bit) or 2^64 - 1 (in 64 bit), which is probably is not what you wanted. But it does not directly cause the runtime error.

      Probably the thing that causes the runtime error is v2[2^32 - 1].

      As for why you aren't getting runtime error in C++ (64 bit). The reason is that when 2^64 - 1 is casted into a long long, it goes back to being a -1.

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

The contest was profoundly unbalanced but the problems were interesting still, thanks!

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

Can anybody please help me in finding what is wrong with my code for D. Any counter testcase would help.

WA on tc 2 140096931

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

If anyone's getting runtime error in C try defining your own stoi function rather than using the standard one I dont know why this works tho :(

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

Hi everyone This is my first Codeforces contest and I see that now there's a hacking stage. I know you're meant to try and break other people's code but does someone know where I can find the details, please? Many thanks

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

I solved D with binary Search.

Simply Binary Search over the answer and check for the following two conditions :-

(1) All friends must have at least one joy value which is greater than or equal to our mid(checking for mid) value.

(2) There must exist at least one shop from which we can buy two gifts for our friends with value >= mid because we can visit at max n-1 shops because if we can buy two gifts from a single shop then simply we can visit all other shops to buy left gifts.

For more clarity look at the submission 140061439

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

    We are checking two numbers greater than mid for any shop so let's say there exist two numbers greater than mid and all the rest conditions are also fulfilled then we are taking the answer as mid(which doesn't exist in the array) , so how are you assuring that the final answer will exist in the given 2-D array. Will the binary search cover all the cases ?

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

      Yes it will

      Suppose for a certain mid value which does not exist in the array both conditions are true

      at that moment we are intializing ans to mid and changing left bound to mid+1 which means for the next value greater than mid which is present in the array ans will be true and our mid value will visit that particular once and our ans will be maximised there

      I hope you understand

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

    you can make it easier

    1. for each store find a gift A with the largest joy and gift B with the second largest joy (max and second max in each row)

    2. сhoose the store X with the maximum B value

    3. for two friends, take these two gifts in the store X

    4. for another friends take a gift with larges joy without limiting the store (max in column)

    all calculation is performed in one pass O(n*m)

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

Can someone tell me why this solution is giving WA? https://mirror.codeforces.com/contest/1619/submission/140060676

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

Oops I thought it's div 3 .

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

Problem d is so difficult to understand, how to solve it

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

Great round with high quality samples (especially for problem D!) The problems where overall very interesting (it could be more balanced but I just read UPD 1 which is fixing this problem) The little bad point I can find is that problem F statement is way too long

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

https://mirror.codeforces.com/contest/1619/submission/140090821

can someone pls explain why I get a runtime error on case 2. My code seems to work for every test case I try.

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

    No idea but try on your own for this test:

    3
    8
    8 8 2 0 2 4 7 3
    8
    5 4 5 1 8 7 2 7
    8
    0 6 1 6 1 0 6 5
    
  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Most probably it is due to the line usable.back() incase your usable vector is empty In that case mex[i+1] directly becomes -1

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

What could be done in D if we have to visit atmost K(any arbitrary number) shops instead of n-1 ?

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

    I believe in that case the problem becomes NP-complete. We can reduce the vertex cover problem (which is known to be NP-complete) to the problem you proposed. But first, let's assume that $$$p_{ij}$$$s can only be $$$0$$$ or $$$1$$$. Therefore, your problem becomes: are there at most $$$K$$$ shops such that we can buy $$$n$$$ gifts of joy value $$$1$$$ for each of our friends?

    Now let's get back to the vertex cover problem: Given a graph $$$G(V, E)$$$ and $$$K$$$. Does $$$G$$$ have a vertex cover of size at most $$$K$$$?

    To reduce vertex cover to your problem, we map each input of vertex cover to some input of your problem.

    For any vertex cover input ($$$G(V, E)$$$ and $$$K$$$), you can assume that the set of vertices $$$V$$$ is the set of shops, and the set of edges $$$E$$$ is the set of your friends. We set $$$p_{ij}$$$ to be $$$1$$$ if the $$$i$$$-th vertex is connected to the $$$j$$$-th edge. Otherwise, we set it to $$$0$$$. So now, the number of shops is $$$|V|$$$, and the number of friends is $$$|E|$$$. If you can find $$$K$$$ shops from which you can buy $$$|E|$$$ gifts for each of your friends, then you have found a vertex cover of size $$$K$$$. Hence, the problem you proposed is NP-complete which almost implies that there is no polynomial algorithm to solve it.

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

      not exactly sure what you mean, " no polynomial algorithm to solve it." I solved using binary search, thing is it does not leverages of fact of going to "n-1" shops, so you can just change to k. You can check my submission.

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

        The issue is not with the binary search part. The issue is that when you fix some value $$$x$$$ (the midpoint of the binary search), you cannot use the same logic to "test" whether you can have the answer equal to $$$x$$$. In the original problem ($$$n-1$$$ shops), you can check that:

        1. For each of your friends, there is at least one shop with a gift of value $$$\geq x$$$.
        2. At least one shop can support at least two of your friends.

        The same logic cannot be applied when you are restricted to up to $$$K$$$ shops. In other words, you cannot adjust condition 2 to apply to the case with $$$K$$$ shops.

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

Again not div.3 contest :(

Again the difference is only in format, but not in difficulty. If you don't like to make contests with rooms and hacks, pls use the format name "Educational", which is also nonsense, because any round is educational — has discussion and editorials after it.

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

hope to get the last 30 rates

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

is there any solution about this contest?

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

In problem "Wrong Addition"

Here is My Solution

Description of my approach

Edit: I got my mistake but why that mistake is happening I didnt get it In my code I have checked for val2-val1>9 but i was not checking val2-val1<0 that is why it was showing WA but as soon as I included it it got accepted. Can someone please tell me why it is relevant to check < 0 condition?

Here is my correct solution

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

    for a = 5 and s = 4 , s-a will be less than zero and no possible value of b can be found

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

      but if you look at my solution

      in the else condition i have written this code

      code

      here it should take care of the test case which you have shown above then why I have to write another condition for checking < 0?

      PS: thanks for replying and helping.

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

        i will pop one character of a and two characters from s (provided there are two characters in s if not return -1) -> but the two characters can be 0S (S is that digit in s ) which will be still less than A ( digit in a)

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

          ohhhhhhhhhhhhhh ok ok now it makes sense thanks for helping out!

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

      It was mentioned in the constraints that a < s.

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

Can someone tell me why my dp based solution failed on problem d 140078987

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

    Please dont ignore

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

      Sorry didnt read your code.

      but,According to test2 case8.

      Below test output is 5 but correct answer is 4. Maybe your code choose from 4,5 but 5 is not correct.

      test2. case8: 4 2 5 2 4 10 4 8 4 2

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

Thank you for the contest. orz. Where's the editorial?

»
3 years ago, # |
  Vote: I like it -7 Vote: I do not like it

I think that it is too difficult to be a div3

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

ratings not out yet?

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

    Usually it took like 1 — 2 hours before hacking phase off

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

      first of all there was so much noise in comments! and secondly!!! if u dont wanna reply its fine but why so angry?

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

        Did you misread phase off as "F*** off"? lmao.

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

why is it that usually div3 contests take a lot of time in testing and updating rating where as div2 contests take much lesser time?

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

    Because after a div3 or edu round, there will be a 12-hour phase of open hacks.

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

why penalty even if i didn't make any wrong submission ?

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

    Penalty is the total amount of time taken by you in minutes to solve the questions. If you had made a wrong submission, the penalty would just have been increased by 10 for each wrong submission.

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

vovmr , anime lover, KOVAL_ is same acc?

the 3 had almost same coding and F submitted in 1min?!

added Kireev_Andrey

Standings, UserName 3. KOVAL_, 4. titanoBEBRA, 5. imsigma, 12. Kireev_Andrey

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

Hi, In Problem B (Squares and Cubes), I found a direct formula to calculate the numbers. But when I implemented in Python and tested it locally, it gave wrong answer for big numbers (1e9). I used the same formula in C++ and it got accepted.
Python Submission 140133787
C++ Submission 140033550

If Problem setters hadn't given the big testcases in Example, I would have lost too much time tracking this error. How can I avoid this error. It seems to me like a floating point operation error.

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

    You can solve it easily by noticing that when calculating roots of numbers to some power, there is always some error, the error being the root of the number is generally some number below the desired result. For eg, 1000000000 cube root of this in python will give 999.9999999999997, So for numbers till 10^9 as a limit in question, the answer is generally just the perfect cube root or some number bit smaller than our perfect answer. So to solve it, just check if we get x=int(pow(n,1/y)), than try for (x+1)*(x+1)..y times<=n or not, if it is than it means x+1 should also be taken in consideration. So, now x=pow(1000000000,1/3),int(x)=999. So after checking 1000*1000*1000<=1000000000, we will take 1000 into consideration instead of 999.

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

    ur one line solution is good....can u please explain the last part --(ll)(sqrt(cbrt(n))

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

      sqrt(k) and cbrt(k) are built-in functions in c++ math library. They find square root of k and cuberoot of k, respectively. if I write sqrt(cbrt(k)) , Here I'm finding 6th root of k. To Find all the square roots and Cuberoots, I am finding all the square roots first (1, 4, 9) then all cuberoots(1, 8,27..) some numbers might come in both(64, 729..) So subtracting those.

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

There are many people who cheat in a very stupid way. This is what they revealed to us. They solve more than 2 problems in a minute or two minutes and their level is not high at all. Please take the appropriate actions with them and please add a feature on the site to detect these cheaters.

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

    in some cases pow(64000000, 1.0 / 6) == 19 you should know this and be able to correct it

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

      But if this is the case, then it should give wrong in both the submissions

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

        floating point digits sometimes behave unexpectedly,

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

        in second submission (140135847) optimizer helped you — possibly the result of previous calculations was used

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

    You can see the GCC Optimize-Options document here.

    The Ofast option turns on -ffast-math, which includes the -fno-rounding-math option and violates IEEE. IEEE 754 defines 4 rounding rules, but the -fno-rounding-math assumes that the rounding mode is roundings to the nearest. So the floating-point error will be reduced after this option is turned on.

    More details are in the IEEE 754 Wikipedia page and floating point math GCC Wiki page.

    Hope to be helpful.

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

    try to avoid float number whenever you can.

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

In case you are looking for Video solutions.(for A-E only)

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

Regarding Problem C, my AC solution, this solution works fine even when accessing indices<0 from string s. I understand that accessing out of bounds need not always give a runtime error, it rather generally is unexpected behaviour. However since the solution was able to pass all the pretest and main tests, I wanted to clarify that was it all luck or is there any specific value one should expect when accessing negative indices from string (particularly -1). thanks in advance, any help is much appreciated.

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

why no editorials yet?? How to solve H?

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

feeling so happy i am getting specialist first time from this round

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

I got a mail from codeforces that's my solution is coincides with two other participants of problem D. And yeah their solution is quite similar to mine I don't know how they got my code (I'm the one who solved it first). I also compare both the solutions using moss the plag is just 46% So maybe it is just a coincidence. I don't even know these two participants I didn't use any online compiler during the contest. Also, one of them is already an expert so for him this contest is unrated So there is no point in sharing my code with him. another thing is if I did share my code I won't be writing this comment. I really worked hard for this contest and I request you to please look into this matter and do the needful. Thanks a lot

Vladosiya MikeMirzayanov

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

    Try to use unique template

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

      Thanks for the suggestion. Will take care in the future.

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

    Please give me some response MikeMirzayanov Should I wait, should I mail to someone regarding this or what should I do to prove that I am not guilty.

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

I got hacked and it seems that the output differs on codeforces and elsewhere. On few computers I tried to run my algorithm against algorithms made by other people and they gave the same answer.

Is it possible to know on which platform codeforces run to debug the issue? It seems that codeforces long double is not that long :D.

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

    2 42144192 887503681 run your code on this test and compare with others code.

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

      I tested it against the top people and got the same answer.

      I already know about some inputs that do not work on codeforces but work on any other PC I have tested it on. I am trying to find why there is this difference so I know what is the problem and next time I will be more successful.

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

Any hints on E MEX and Increments?

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

    Try calculating least steps needed to get atleast one occurence of i for each 0 <= i <= n. Then the solution logic is straightforward

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

    if you know how many steps it takes to have all the values 0..k in the array ( impact_num )

    and you know count of k+1 in source array ( cnt[k+1] )

    then answer for k+1 will be impact_num + cnt[k+1]

    it remains to calculate impact_num for the next step

    if cnt[k+1] > 0, impact_num will not changed

    if cnt[k+1] == 0, you must find cnt[j] > 1 where j < k+1, decrease cnt[j] and impact_num += k+1-j;

    an effective structure for such a search is a stack

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

      What is k here?

      • »
        »
        »
        »
        3 years ago, # ^ |
        Rev. 3   Vote: I like it 0 Vote: I do not like it
        It is not just to get k, the before shouldnt be disturbed.
        
        If there is no 5 then to get 5 you need something from 0,1,2,3,4 to repeat. If all are single then there is no way to get all 0-5. So for example 0,0,0,4,5
        
        steps[0] = 0 # Already present
        steps[1] = 1 # I can increasing one zero
        steps[2] = 2 # One more extra zero is present so can increase
        steps[3] = -1 # There are extras left, all available extrasare used for till last value
        So it is not possible to get mex value > 3 from the array. So we take -1 for 4, 5.
        for lower values, i.e, for example to get mex value 3 we need 
        steps[3-1] + count[3] i.e., (acheive all values till 3 &mdash; 1) + (convert all 3 to 4) which makes mex value as 3
        
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

This round isnt rated?

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

Is it rated?

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

All I needed was 1 more point. Curse that long long int on test case number 4 of question E.

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

Still waiting for the editorial :/

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

When will the editorials of this contest be released ?

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

Excited for the contest, Always love the CF round.

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

How to solve H ?

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

    How to solve F and G :)

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

      f is construction. you need n%m players sitting on greater part of table (having more player than others). n≥2m -- means if you add layer by layer, they never intersect. like : 111100000000 , 000011110000 and so on. where series of 1's represent the player idx sitting on more greater part of table. n -- people, m — tables. n%m is the length of ones, means it is < n/2.

      g is connecting the points by x than by y. (sort by any cor. say if i and i+2 connect, then i and i+1 and i+1 and i+2 also.) so just add these 2 edges. every connected component will blast at min time of each those points. store these in a vector and binary search on minimum number of moves required. Say you do 5 moves. you do not need to blast those having less than 5 seconds as minimum time. but all those having greater time than this (say # cnt). if cnt <= your_choosen_time. then it is possible else not.

      --- if you do not understand wait for editorial.

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

Where is the editorial? Can anyone tell their logic for H ?

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

    First, note that every element of the permutation is part of a cycle if you keep doing $$$i = p_i$$$. We have two possible approaches the first is to keep all cycles using a heavy structure like treap or splay tree, then operation 1 you basically have to cut the corresponding cycles and merge than in the correct form, and operation 2 is somewhat easy you just need the cycle size and know how to find the k'th element of a cycle and the position of a given element on its cycle complexity $$$O(nlogn)$$$. The other aproach is to every element you save the next and previous element on its cycle as well as where you ended up if how make $$$i=p_i$$$ $$$sqrt(n)$$$ times, its possible to do every update of type 1 in $$$\mathcal{O}(sqrt(n))$$$ and answer every query of type 2 in $$$\mathcal{O}(sqrt(n))$$$, you use jumps of $$$sqrt(n)$$$ size until you can't make anymore, and then you make at most $$$sqrt(n)$$$ jumps of size 1 to end up where you want, the complexity of this second approach is $$$O(n sqrt(n))$$$ and it's much easier to code.

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

      Thank you ,i was doing it with dsu but was not come up with a solution on how to use path compression on dsu so got tle on test 13 .The above idea is great ,but do you know how to do the problem with dsu ?the main problem in using dsu is how to do path compression so it doesn't take long enough time to compute values

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

why my solution for c fails? please help what is it that I am missing? https://mirror.codeforces.com/contest/1619/submission/140180338

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

    It fails on this case — 1 101 From first looks I think you have a bug in your check() function.

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

Editorial Please.

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

please help ! multiset is not working properly on codeforces it is giving wrong output, but it works fine on local (problem E)

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

    I have never met such problem before

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    1. multiset is working properly

    2. to solve problem E, use vector and any stack implementation (see 140107223)

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

why the answer of

4 4

3 1 2 7

10 3 9 9

8 1 4 7

1 7 9 3

in [problem:D] is 9 but not 7.

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

    7 is correct answer, your submission 140233437 got WA on another test

    test 22 is

    4 4

    7 10 3 7

    10 2 4 9

    6 5 1 8

    9 7 10 8

    correct answer is 9 and last your program find it correctly

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

exactly i dont know what i know Esquire MohammadParsaElahimanesh