Discussion Thread.

Problem A: ATM Queue

Problem B: Metal Harvest

Problem C: Painters' Duel

Problem D: Yeetzhee

Contest Link: here

Before contest

Codeforces Round #680 (Div. 1, based on Moscow Team Olympiad)

09:02:08

Register now »

Codeforces Round #680 (Div. 1, based on Moscow Team Olympiad)

09:02:08

Register now »

*has extra registration

Before contest

Codeforces Round #680 (Div. 2, based on Moscow Team Olympiad)

09:02:07

Register now »

Codeforces Round #680 (Div. 2, based on Moscow Team Olympiad)

09:02:07

Register now »

*has extra registration

# | User | Rating |
---|---|---|

1 | tourist | 3619 |

2 | Um_nik | 3493 |

3 | ecnerwala | 3446 |

4 | Radewoosh | 3383 |

5 | ksun48 | 3357 |

6 | yosupo | 3324 |

7 | Benq | 3299 |

8 | maroonrk | 3243 |

9 | apiadu | 3238 |

10 | Petr | 3217 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 207 |

2 | Monogon | 196 |

2 | SecondThread | 196 |

4 | vovuh | 188 |

5 | pikmike | 186 |

6 | antontrygubO_o | 185 |

6 | Um_nik | 185 |

8 | Ashishgup | 182 |

9 | pashka | 169 |

10 | Radewoosh | 167 |

Discussion Thread.

Problem A: ATM Queue

Problem B: Metal Harvest

Problem C: Painters' Duel

Problem D: Yeetzhee

Contest Link: here

↑

↓

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Nov/01/2020 05:02:54 (h3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

How to think about D?

I basically wrote brute force with cache. That was enough to pass hard.

The main idea is we don't re-throw dice in the turn if we still can get the answer. Then I just kept all groups I could have by current turn and iterated which number I get in current turn. Then honestly update vector, sort it and check that given one is still greater in each position.

Why that works fast? It seems we don't have that many states.

Hi, in the first sample input, why it takes an average of 1.2 dice rolls "If the first and second dice are the same"? My thinking so far: since the first and second are the same, the third dice has to be one of the other five numbers, sometime it will take more than 2 rollings if bad luck strikes, so EV will be 5/6 * 1 + 2 * (1/6)¹ + 3 * (1/6)² + 4 * (1/6)³ + .... , but this EV is already 1.25 something.

Thank you.

how to solve B?

It seems the most challenging part was to understand the statements. Basically we need to sort all segments, then take one by one and greedy place robots (you actually use each of robots once, not reuse them). Then you might have some suffix left for the robot. We just take next segment and check if this robot can cover it as well. If it can, we do nothing. If it partially covers it, remove that prefix from the segment and then put new robot as described before.

Agreed!

Understanding the statement was the most difficult part of the problem.

What's wrong with this? https://ideone.com/cVxZmG

C was fun! Thanks authors! :)

Could you provide any insight or intuition on why the recursion depth is actually low?

Also can someone help me if there is any non-backtracking solution to the same ?

Intuition was this: I have no idea how to solve it other way, applying profile DP or so. Then another idea is we pretty quickly shrink number of valid moves and there are many states where we have only one option. Having fun I implemented simple brute force and that did not get TL.

Is this joke

Actually not! I am one of those who thinks that there is a word "programming" in "programming competitions". Sometimes it is nice to have good old-fashioned brute force :)

But your problems are fun too! Thanks to you for making my old brain thinks sometimes :)

How to solve C?

Google kickstart/codejam mostly ask problem based on expected value and i am never able to make it. Just gonna enjoy the fact that i am dumb!

You are not alone :P

Well, you have an exciting opportunity to learn it. Imo, you cannot find a truly involved problem in terms of probability because a few people would solve it. So you only have to understand basics from probability (and presumably a lot more at coding).

Try this may be it'll help

Thanks!