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

Автор karavaiev, 5 лет назад, По-английски

Hi, Codeforces!

I'm glad to invite you to take part in Codeforces Round 720 (Div. 2), which will take place on May/07/2021 17:35 (Moscow time). The round will be rated for the participants with a rating lower than 2100. Participants from the first division are also welcomed to take part out of competition.

You will be given 2 hours 15 minutes to solve 5 problems. All the problems were created and prepared by me. One of the problems is interactive, please read the guide of interactive problems before the contest.

Huge thanks to those who helped make this round possible:

I tried my best to create interesting problems and clear statements, so don't forget to read all ones :)

Scoring: $$$500-1000-1750-2250-2750$$$.

Hope you enjoy it!

UPD: Editorial is published!

UPD: Congratulations to the winners!

Div. 1:

  1. dorijanlendvaj

  2. Tlatoani

  3. Maksim1744

  4. neal

  5. Monogon

Div. 2:

  1. musdolph

  2. krasav4ik

  3. in_love_with_Liza

  4. hyta4982

  5. lana_og

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

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

hope the problems are as interesting as your rating graph

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

Interesting scoring distribution, hope its_Atrap like CodeCraft-21 and Codeforces Round 711 (Div. 2)

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

Hope problem C will be interactive! :)

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

Another chance for me to become Specialist... or Newbie

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

I think the problems will be cool!

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

excited to participate in this contest ... seems to be amazing :)

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

My First Rated Contest :D, I hope I can make Tanya proud :)

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

Problem C 1750 Points ! a bit scary.

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

which problem will be interactive? Any guesses?

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

Resolved... Thanks!

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

hope i can solve c

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

PurpleCrayon orz

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

Guys, can you please press green triangle to raise this round's contribution

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

The problems seems very elegant after watching their score distribution, you should participate in the round.

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

Let's hope the server will not get down in this contest

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

Want Ashishgup div 2 rounds.

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

One thing i encounter in previous Codeforces round 719 problem F1 interactive problem for someone who attempted such type of problem for the first time. fflush(stdout) didn't work with FAST i/o .

submission link->https://mirror.codeforces.com/contest/1520/submission/115326611

you can remove Fast i/o fflush(stdout) that will work

submission link ->https://mirror.codeforces.com/contest/1520/submission/115344437

in same code i used cout.flush() it worked with Fast i/o.

submission link -> https://mirror.codeforces.com/contest/1520/submission/115336786

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

That C's rating makes it so sus for interactive problem!

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

the same day as my birthday)) (tomorrow)

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

Hoping to learn something new from the questions. All the best to everyone :)

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

Good Luck Everyone!!!

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

Hopefully problems will be interesting. Another chance for me to become pupil.

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

what are the difference between the divs? I'm not very familiar with this CP platform.

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

Last Global Round I passed out and my rating reduced. Hope my name turn blue again.

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

Karavaiev has a handsome avatar.

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

2:15 for 5 problems looks so interesting and challenging :) good luck everyone!

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

The participants of the first division should participate after the contest (virtual participation) to prevent any slowness in queue or codeforces will go down

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

its my first contest and i hope i can get top 10

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

5 problems in 2 hours 15 mins? Seem hard...

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

Can someone tell me what the rating for each of the problems will be rather than score?

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

let us just acknowledge the fact that the testers' list was ordered taken their colors in mind!

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

gimme some negative contribs, I am hungry fellas

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

Looks like there is a long queue of submissions pending to be judged. Hope this contest wont be affected.

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

hoping to become grandmaster in this contest

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

constructiveforces

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

Good luck to everybody having fun with this kind of problems.

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

Nastia and Negative Rating

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

problem C looks quite hard

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

There goes my green color

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

A. Nastia and a rating killing problem

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

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

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

Stupid dashboard,,,

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

MikeMirzayanov

I submitted a solution (WA on given sample test) and then due to some technical problems, not able to continue further.

So, will my rating will be affected or not. I will be considered as participant ?

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

I just wonder why an expert deliver this contest ... I really think the quality of problems is bad .

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

You can downvote me if you want, but I thought C was a pretty shit problem overall. Idk what was so bad about it, my implementation didn't even end up being that bad...just thinking about all the cases and working around that god-awful min-max function ticked me off I guess :\

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

Nice problems! Слава Україні.

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

Doing heavy-light decomposition from arbitrary leaf and then connecting heads and tails isnt optimal in D?

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

For God's sake, this round was not Div2... :(

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

My answr to D is summation{max(0,degree-2)} over all vertices, is the answer less than this?

Waiting for editorial

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

I should have taken more time to understand the questions, made silly mistake in A and B. But loved the overall experience and looking to learn from my mistakes.

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

what's the cruelest thing one can do?

RESTORE THE ANSWER

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

I don't like it

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

How the heck to solve C ? Never seen such a problem like this. Actually A was badass. Could have told that the number might be divisible by B, only should not be divisible by AB

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

    I think I was able to come up till 2*n solution but not know what to do for 3*n / 2

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

    in ~[n/2] queries we can find the position of 1 (or n) and then using this position we can find the rest of the numbers in n-1(or n-2, doesn't matter) queries

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

    First try to find position of n in array using query 1. You can do this by checking adjacent pairs and if their result is n-1, check the swap as well. This takes atmost ceil(n/2) + 2 queries.

    Using this position of n, you can easily find all values via query 2. This takes at most n-1 queries.

    So total queries are well under the limit.

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

    Use $$$t = 2$$$ and $$$x = 1$$$ to find $$$1$$$ in permutation for $$$n / 2 + few$$$ queries (if $$$p_i == 1$$$ then answer is $$$1$$$);
    Use $$$t = 1$$$ and $$$x = n - 1$$$ to find other numbers in permutation for $$$n - 1$$$ queries (if $$$p_i == 1$$$ then answer is $$$p_j$$$).

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

    ? t i j x Important observation: t=1 and x=n-1 max(min(n-1,Pi),min(n,Pj)) equals — n-1 if Pi=n — max(Pi,Pj) otherwise

    t=2 and x=1 min(max(1,Pi),max(2,Pj)) equals — 2 if Pj=1 — min(Pi,Pj) otherwise if anyhow by using t=1 and x=n-1 we get the position of n in the permutation in <= (n/2)+30 queries , we can get remaining elements by using t=2 and x=1 in n-1 queries we can get the remaining elements in n-1 more queries.

    How to get the index of n ?? we can see that for (i,j) t=1 and x=n-1 the output can be n only when Pj=n if output is n-1 Pi can be n we can check take (i,j) like this ( 1 2 ) ( 3 4 ) ( 5 6 ) . . . if the output during any stages is n we get index_of_n otherwise we get a set of possible values of index_of_n (corresponding to output n-1,with max 2 possibilites)

    so we can check the index of n in max (n/2) + 2 queries after that our job is done

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

I wish I could just unsubmit my solutions and wait for the next contest.

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

hello, tried to participate for the first time — failed miserably :) (I didn't have full 2 hours anyway, but not sure it would help if I did). One question — what are pretests ? my submission failed pretest 3 (am I supposed to be able to see pretests ?) I only was able to see the example test provided in the description of the problem. Thank you

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

Good bye expert

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

How to do C?

My idea was to find any one element via binary search using 30 queries ( preferably the first element), then keep constructing the permutation from left to right using at most 2 queries each. I implemented the second one, but couldn't exactly figure out how to find the first element.

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

    you can find the maximum of the permutation in about n/2 moves with t = 1, x = n-1, changing i and j every time. If you get the result n, j is the position of the max. If you ever find an n-1, try for j and i. If then you get the result n, that means i is the position of the max.

    And then using the maximum you can use t = 2, x = 1 to find each element in n moves.

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

    Indices are have to be different. I wasted 30 mins implementing this then noticed the statement.

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

    My not so interesting solution.

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

    Asking queries of type 1 with $$$x=n-1$$$ will give you the maximum value among two positions asked. If the answer to the query is $$$n-1$$$, just ask the same two position again with $$$n-1$$$ value and take the greater answer of the two queries asked.

    Same thing with min and queries of type 2.

    After you get the maximum and the minimum, one query of type one for two position with value equals to $$$minValue$$$ (found above) will tell you which of them is the larger and which is the smaller.

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

    I took 12 queries to figure out exactly what the first three elements are.

    Then I query every other element (of index idx) with the largest known element (of index maxidx)

    • First I use a type 2 query that works if the other element is smaller t=2, i=idx, j=maxidx, x=1
    • If the other element is larger, I follow up with a type 1 query t=1, i=maxidx, j=idx, x=n-1

    I update the largest known element along the way.

    The worst case is still 2n. To avoid the worst case, I shuffle the remaining queries.

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

    I had exactly this solution: 115619047

    To find the value of the first element I used binary search:
    After checking different values of $$$x$$$, I relaized that the query of type $$$1$$$ returns $$$x+1$$$ if and only if $$$x \leq p_j$$$. And it doesn't even matter what the value of $$$p_i$$$ is. This allows us to do binary search on $$$x$$$ to find the value of $$$p_1$$$, by doing queries like $$$(t=1, i=2, j=1, x=mid)$$$, where $$$mid$$$ comes from our binary search.

    After we found the value of $$$p_1$$$, we can find the value of every other element in at most 2 queries. But in the worst case it might be exactly 2 queries per element, e.g. if the permutation is sorted in reverse. That's why I shuffled the indices, hoping that it will take 1.5 queries on average.

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

Why was problem statement of B written in reverse order? It was so confusing before the statement got changed. The conversion of pair was written before the condition which didn't make any sense.

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

Isnt finding the diameter of the tree and then using Topological Sorting the intended solution for D.

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

Today I learnt that being divisible by a*b is not equivalent to being divisible by a and divisible by b.

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

1) ConstructiveForces 2) MathForces 3) PoorForces

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

Why I kept reading "a*b" as "a and b" in the A problem?

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

problem B was looking carefully on constraints.

a[i]<=1e9
x,y <=2e9 and 1e9+7>1e9 is prime :)

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

What was the answer to D? What was the counterexample to selecting the maximum diameter for a tree, disconnecting the edges on the maximum diameter path, and then recursing on each individual component to create the bamboo?

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

OK... Only solve A... WA 5 times. LOL

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

Tbh felt more like Div1 than Div2, solving only A and B in Div2 sounds bad..

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

FOR A why is this incorrect x+y==z (a)+(a*b)==(b+1)*a ng g ng

if(a==b||b==1)---no else yes???

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

How to solve D ??

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

I swear those min/max functions in C looked exactly like this on my screen...

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

Solved A in 2 attempts, and B in 6 !! Really great questions, learned a lot. _/_

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

My learnings from the contest: Nobody knows what a good array looks like

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

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

I was able to solve D by reducing the problem to the minimal path cover problem and solving that using dynamic programming. Is there any other way to solve for the minimal path cover in a tree?

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

    Can you please also give links to minimal path cover good articles?

    Also, can you tell any case where minimum answer won't be just cascading child (when >1 for non-root node)? Can't think of even that :(

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

Truly interesting round, but I lost tons of point on WA :(

By the way, how to solve E...I tried to construct a grid like this:

x x x 
0 0 0 
x x x 

Where $$$x$$$ presents the number. And then expand this grid's size by one per step, randomly fill other numbers in available positions.

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

In problem B, earlier it was "any i" then it got changed to "all i's".. -- WA.

Also, Goodbye expert :p

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

    The given sample testcases should've cleared it out, I had to check them to make sure I was getting it right. Although all in all yes the question was poorly written at the start of the contest.

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

My idea for Div2D

  1. Greedily remove the edges (u,v) with degree[u] > 2 && degree[v] > 2.
  2. Then again, iterate over the edges and remove the edges (u,v) with degree[u] > 2 || degree[v] > 2
  3. Connect all the nodes with zero degree together to form a chain. If there is only one zero degree node, then connect it with a one degree node. (There must be atleast 2 one degree nodes in a tree)
  4. Collect all the nodes with degree 1 and connect them together only if they don't form a cycle. (This could be done using a DSU and 2 pointers)

Is this logic correct ?

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

i wish, i could undo myself 3 hours back!

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

Is it round from I_love_myself? (According to the names of the tasks)

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

Thanks for the contest, I really like problems B and E. None of the problems alone are bad, however looking at all of them together felt monotonous. There wasn't much diversity in the set and the statement seemed confusing at times.

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

div 1.5 huh?

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

    more like div 1.25 tbh

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

      Deleted.

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

        More like 1.3141592653589793238462643383279502884197169399375105820974944 5923078164062862089986280348253421170679821480865132823066470938446095 5058223172535940812848111745028410270193852110555964462294895493038196 4428810975665933446128475648233786783165271201909145648566923460348610 454326648213393607260249141273724587006606315588174881520920 9628292540 9171536436789259036001133053054882046652138414695194151160943305727036 5759591953092186117381932611793105118548074462379962749567351885752724 8912279381830119491298336733624406566430860213949463952247371907021798 6094370277053921717629317675238467481846766940513200056812714526356082 778577134275778960917363717872 tbh

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

Was only able to solve, A and B, so maybe I'm not qualified enough to say this, but the problems were good. Especially the B one, had to stress test my code to find a mistake XD. Also, problem A showed me the importance of reading a problem carefully and not underestimating A (spent over 30 minutes on it LOL). Don't know if I'll sink or swim in this one, but it was a fun one.

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

for Problem A,

a=1, b=1

why x=1, y=2 ,z=3 is not a answer? x+y=z

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

I solved B by converting the array in the following way — {1e9 + 7 , min(a[0],a[1]) , 1e9 + 7, min(a[2],a[3]), 1e9 + 7 ........}. Then if n is odd I make a final operation n-1 and n-2 making a[n-1] = 1e9 + 7 and a[n-2] = min(a[n-1],a[n-2]). Here is my solution(https://mirror.codeforces.com/contest/1521/submission/115604019).

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

I think the authors wrote Div.2 instead of Div.1 by mistake. (not saying contest was bad. It's just I was bad at those questions)

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

Why does 115570549 give MLE for B?

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

    If $$$n = 1$$$ you output 0, but don't read the array element, so on the next iteration you'll read the array element instead of $$$n$$$, which can be up to $$$10^9$$$.

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

Solution for Div2B without using 10^9+7. Find the index of minimum element(if there are more than one choose any). Let's call it idx. Now use this index with every other index i and do,

if(i<idx)
a[i]=a[i+1]+1; // print idx i a[idx] a[i+1]+1
else
a[i]=a[i-1]+1; // print idx i a[idx] a[i-1]+1
»
5 лет назад, скрыть # |
 
Проголосовать: нравится -48 Проголосовать: не нравится

bad contest, very bad problem C. Please don't allow blue to make any contest from now.

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

Looks like my dream of becoming an expert will always be a dream :(

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

Level of questions were very good. Even first problem was good enough to take time.

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

for problem c i listed all the possibilities, and figured that if query(t = 2, l, r, x) gets the answer exactly x meanwhile query(t = 1, r, l, x) gets the answer lower or equal to x, then p(i) is not more than x. thus we can do binary search and the total queries will not exceed nlogn. however it got WAed on pretest 3, may someone help me?

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

Hopefully, I can become an expert for the first time. BUT I DID'T

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

I really liked the idea behind problem D. It was just amazing. Although i wasn't able to solve D in the contest but learnt a lot.

Btw great contest.

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

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

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

Can anyone give me corner for B,I dont know why my approach failed? karavaiev

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

today 10^9 + 7 proved it's importance to me...great contest btw.

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

Karavaviev please don't make any contest in future problem A its was so easy input 3 5 3 13 2 7 11 output YES 10 50 60 YES 169 39 208 YES 28 154 182 WTF

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

Very nice contest. Thank you Karavaiev.

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

"I tried my best to create interesting problems and clear statements, so don't forget to read all ones :)"

A problem was very unclear karavaiev "Otherwise, the integer is nearly good, if it is divisible by A." this mean nearly good no. can be divisible by B or not? Eg. 4 2 Correct o/p : 8 4 12. In whole contest i was thinking it cant be divisble by B and ruined the contest

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

https://mirror.codeforces.com/contest/1521/submission/115630016 this is my solution and it showing wrong output format Expected int32 anyone plz tell me how to resolve it??

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

Where can I see the editorial?

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

in problem B..........for input 9 6 3 11 15....my output is.....1 2 1500450271 6 and 2 3 1317313771 3....the array becomes.........1500450271 1317313771 3 11 15....why is this wrong.....actually my approach is whenever the gcd of two consecutive element is not 1....greater element will get replaced by a prime number(p)... 1e9 < p < 2*1e9 my solution https://mirror.codeforces.com/contest/1521/submission/115631210

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

Can you explain how to solve task D?

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

In D, The given sample 1st test case tree is already bamboo tree. Every node have 2 child

But why it require some operation

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

Where's editorial?

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

.

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

    It's hard to say that the difficulty distribution of problems was very good. A and B were not that easy either, and C apparently seems to be harder than the usual C. Not to mention D. I think that the good problem doesn't guarantee a good contest :(

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

This was the toughest codeforces round for me till now. :)

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

In problem A how you answer 56 8 YES And print 3 good integer while you said exactly one ???

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

What will happen when A=4 and B=1?

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

Codeforces Div.2(NO) Special Problems Round(YES)

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

Problem E is interesting :)

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

In problem A if A is divisible by B the answer must be No but my solution got accepted without handling this case ... I smell an unrated round :(

Edit I smell my stupidity XD

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

Google Forces......

A similar problem compared with Problem D.

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

(deleted)

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

Why are Interaction Problems actually useful when we can do it normally(In the sense standard way of I/O) as well good contest btw learned a lot

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

Is there a solution to D?

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

Why my blog is hidden in the recent blog tab? Sorry for writing this here cuz i'm not able to write a blog now!

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

Problem A : Shouldn’t the answer be NO if a is divisible by b?

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

All tasks have "constructive" tag?!

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

Спасибо за раунд!!!