awoo's blog

By awoo, history, 14 months ago, translation, In English

2070A - FizzBuzz Remixed

Idea: BledDest

Tutorial
Solution (BledDest)

2070B - Robot Program

Idea: BledDest

Tutorial
Solution (Neon)

2070C - Limited Repainting

Idea: BledDest

Tutorial
Solution (awoo)

2070D - Tree Jumps

Idea: BledDest

Tutorial
Solution (Neon)

2070E - Game with Binary String

Idea: BledDest

Tutorial
Solution (BledDest)

2070F - Friends and Pizza

Idea: BledDest

Tutorial
Solution (BledDest)
  • Vote: I like it
  • +11
  • Vote: I do not like it

| Write comment?
»
14 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

From this round I received an important tip: You don't need to read the statement incorrectly. You need to read the statement correctly.

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

For A: just print 3 * (n / 15) + min(3, n % 15 + 1)

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

Btw in the editorial algorithm complexity is O(n), not O(1)

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

    It's probably because before looping through n, there is n %= 15, which ensures that n is always less than 15. Since increasing n doesn't affect the code's execution time — hence O(1).

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

Why did my submission 308279845 for problem F result in a Denial of Judgement? The testcase information indicates "Generator is not determinate."

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

    Damn , first time seeing this ;-; , I guess problem with codeforces, in the test case verdict it is showing Verdict: CRASHED.

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

I don't think question E should be in this position

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

Small mistake in problem A's tutorial: it should be $$$n/15$$$, not $$$n15$$$.

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

A is just — 0 1 2 15 16 17 30 31 32 45 46 47 ....

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

seems like I'm the only one who printed n/15 + (n — 1)/15 + (n — 2)/15 for A lol

»
14 months ago, hide # |
Rev. 2  
Vote: I like it +5 Vote: I do not like it

It seems like problem F has a problem with generator for the 64th test.

Could you check it please?

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

How can we calculate OR Convolution using FFT?

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

there is a tiny mistake in tutorial of F:

"We need to make a convolution for which some bits (represending even-sized pizzas)"

might be "representing".

not very important.

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

Can anyone explain me the problem D

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

    Acknowledge that you can get to a node with depth d from all nodes that are above it with the exception of its parent node. We can calculate the number of ways to get to a specific node (lets call it dp[n] for node n), and for each node, calculate the number of ways to get to any node such that the depth is 1 less than it, then subtract the number of ways to get to the parent node. Rest of the solution is just impl and caching ways to get to all nodes of a certain depth. For a much easier variation on this problem, try a problem like https://leetcode.com/problems/climbing-stairs/ (easier) or https://www.codewars.com/kata/647d08a2c736e3777c9ae1db (a bit harder), same general idea, but with a much simpler implementation

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

In B problem, why are we iterating over the string only "once"?

Isn't it possible that the robot reach zero after two or more executions of the MOVES? Like when x is really far from 0, say -100 and the moves are like "RRL".

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

Any better intuitive approach for E?

I can't seem to see any possibility that I would build a solution as given in the editorial during a timed contest.

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

for E (c0>=3*c1+2 or c0==3*c1-1) is enough for player 1 to win otherwise player 2 wins

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

I don't get the solution for C at all. It seems like it completely ignores the possibility that we might want to color some red blocks to minimize the penalty even though first test example in the problem statement does so... Test:

6 1

BRRRRB

100 1 1 1 1 100

As far as I can tell, the best operation for this test is to paint the entire strip blue so we cover both 100 and the penalty is 4. If I feed this test into solution code above, output is 1. And it still gets accepted. How?

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

    Thats coz they've told that the final penalty is the max of all the penalties of the wrong colored cell,.... Not the sum :-)

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

Guys how like how tf you guys manage to even understand the 4th test case in problem C?...Yeah I know BS is to be applied since min-max is been asked but again how tf ?