Kogut_Ivan's blog

By Kogut_Ivan, 12 months ago, translation, In English

We hope you enjoyed the contest! Thank you for participating! This is our second official round on Codeforces, so we would be happy to hear your feedback in the comments and in the mini-survey below.

How did you like the contest?
Which problems did you like (you can choose multiple)?
Which problems did you not like (you can choose multiple)?

2132A - Homework

Idea: Wileyne; developer: Wileyne

Editorial
Solution

2132B - The Secret Number

Idea: fstilus; developer: fstilus

Hint
Editorial
Solution

2132C1 - The Cunning Seller (easy version)

Idea: fstilus; developer: KotlechkovEgor

Hint 1
Hint 2
Hint 3
Editorial
Solution

2132C2 - The Cunning Seller (hard version)

Idea: Boodoochai; developer: KotlechkovEgor

Hint 1
Hint 2
Editorial
Solution

2132D - From 1 to Infinity

Idea: fstilus; developer: fstilus

Hint 1
Hint 2
Editorial
Solution

2132E - Arithmetics Competition

Idea: EzikBro; developer: EzikBro

Hint 1
Hint 2
Hint 3
Hint 4
Editorial
Solution 1
Solution 2

2132F - Rada and the Chamomile Valley

Idea: Friendiks, Wileyne; developers: Friendiks, Wileyne

Hint 1
Hint 2
Hint 3
Hint 4
Editorial
Solution

2132G - Famous Choreographer

Idea: fstilus; developers: fstilus, pskobx

Hint 1
Hint 2
Hint 3
Hint 4
Hint 5
Hint 6
Editorial
Solution
  • Vote: I like it
  • -133
  • Vote: I do not like it

| Write comment?
»
12 months ago, hide # |
Rev. 3  
Vote: I like it 0 Vote: I do not like it

I found the solution for C2 1 minute after the contest ended! I am so sad :(

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Thanks for the fast editorial and the contest... very mathematical

»
12 months ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

Thank you for the contest! The problems felt very new and refreshing.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

This contest is below the average not good and not bad.

»
12 months ago, hide # |
 
Vote: I like it +4 Vote: I do not like it

Amazing contest! C2 was really fun.

»
12 months ago, hide # |
 
Vote: I like it -11 Vote: I do not like it

F is a piece of cake if you've solved this

»
12 months ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

Thank you for the contest ! , although I did unrated , but definitely one of my most favorite Div3's .

Kudos to authors.

»
12 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

HELP

I did exact same thing as mentioned in editorial for problem F but it gives WA,any help is appreciated Kogut_Ivan .

Submission — 334939521

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

F was easy but i missed the output format i thought if there are no valid lanes then just output single line -1 and move for another testcase:(

»
12 months ago, hide # |
Rev. 3  
Vote: I like it +3 Vote: I do not like it

D is already online available: Geek for geeks cses

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I am here after hearing that 2132E - Arithmetics Competition is practically equivalent to 2063D - Game With Triangles. As the coauthor of that problem, I must confirm that this is true. So you cannot fail to disappoint, huh...

»
12 months ago, hide # |
 
Vote: I like it +23 Vote: I do not like it

I demand justice for ternary search solution for problem E! This problem is actually so fun to do ternary search with, as the moment you realize the function is linear brings so much satisfaction (from my 10-second long experience, it is indeed satisfactory)!

»
12 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

D is similar like digit queries of CSES problemset. I already solved digit queries still not able to solve the d problem sad :(

»
12 months ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

F was really amazing!

»
12 months ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

The problems were too mathematical and time consuming. Personally, I did not like the contest.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Who is supposed to know or think this: If Vadim appends k zeros to the number x, what will be the ratio between n and x? I'm not doing math olympiad.

  • »
    »
    12 months ago, hide # ^ |
     
    Vote: I like it +6 Vote: I do not like it

    Actually it's very easy to find the solution once one think like a mathematician.

»
12 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Math forces. I did e and f but not c2 and d, hope to see another div 3 soon ☺️

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can someone explain why ternary search works in E but not binary search?

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

    I used binary search 334924908

    Idea : Sort both arrays in descending order and try to find i and j such that a[i] and b[j] are as close as possible

»
12 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

С2 is so nice

»
12 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

E and C2 are interesting!But I don't like D.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hello! If my rating is 1400 right now, what number of tasks in a contest should i ac so that it won't drop the rating? Thx

»
12 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

Simpler solution to D:

Binary search for the largest $$$L$$$ such that the total number of digits in $$$1, ..., L$$$ is at most $$$k$$$. Then, compute the sum of digits of all numbers in $$$1, ..., L$$$ as well as the partial piece of $$$L + 1$$$.

The number/sum of digits in $$${1, ..., N}$$$ are standard problems. The latter can be calculated via a digit-dp like approach.

Code: 334983266

»
12 months ago, hide # |
 
Vote: I like it +7 Vote: I do not like it

A good contest! I love it.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Why should we do k /= 2 in C2 solution?

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Good C2 but bad F and G.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Wileyne Note that this function is convex Isn't the function concave ?

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

In problem-C1, I found attached statement ambiguous

Statement

Which parameter should be minimized first? no of deals or cost

Because as per formula, cost(3^(x+1)) > cost(3*3^x)

Proof

This means if we increase no of deals cost will reduce but if we reduce no of deals cost will increase

  • »
    »
    12 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    The statement, "considering that he will make the least possible number of deals", defines the number of deals explicitly. That is, you need to consider the minimum number of deals in general. From there, minimize the amount that will be paid.

    Note: The minimum number of deals is sum of digits in the base-3 representation of the given number.

»
12 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Why do I get Wrong Answer on test 97 when I submit the author's code (problem G)?

  • »
    »
    12 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    Considering that the base set and modulo in the editorial's solution is fixed, I would guess that test 97 is a hack case.

    Random fact
»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Feels like I’m doing a math olympiad, not a Codeforces contest

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

great editorial!

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

F is such a great problem!! Loved it,although I have not read the tutorial yet but saw some solutions,I think everyone's doing the same thing as I did.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

If a unimodal function has a flat top, can the ternary search algorithm be applied on the integer domain only if the flat top occurs at the extremum point? I used to think that if there was a flat top, the ternary search could not be used.

  • »
    »
    12 months ago, hide # ^ |
    Rev. 3  
    Vote: I like it +3 Vote: I do not like it

    It can be applied to that along with a few other forms of unimodal integer functions. You can search a unimodal integer function so long as it has strict inequality on one end and loose inequality on the other. In other words, it must be in one of these forms:

    $$$f(1) \lt f(2) \lt \dots \lt f(k) \geq f(k+1) \geq f(k+2) \geq \dots$$$ $$$f(1) \leq f(2) \leq \dots \leq f(k) \gt f(k+1) \gt f(k+2) \gt \dots$$$ $$$f(1) \gt f(2) \gt \dots \gt f(k) \leq f(k+1) \leq f(k+2) \leq \dots$$$ $$$f(1) \geq f(2) \geq \dots \geq f(k) \lt f(k+1) \lt f(k+2) \lt \dots$$$

    If we were to allow loose inequality on both ends, then getting the same value twice wouldn't tell us where we are relative to the maximum/minimum (whereas allowing it on strictly one end tells us that we are currently still on the same side of the maximum/minimum so long as we are comparing two consecutive spots during the ternary search). An example of an implementation which supports the aforementioned ternary search property can be found on kactl.

»
12 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

In problem E, the writer says "This will be the optimal answer because all the cards taken from array a will be at least as large as all the cards that have not yet been taken from array b , meaning there is no point in making additional swaps of cards from one array to another." Can any explain this? I don't understand.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Alright how the hell is this a div 3 competition?

»
5 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

why so many downvotes?