2009-2010 ACM ICPC Southwestern European Regional Programming Contest (SWERC 2009)
10 problems from 2009-2010 ACM ICPC Southwestern European Regional Programming Contest (SWERC 2009) (contest 102470), difficulty -. 6/10 solutions verified against sample I/O.
2009-2010 ACM ICPC Southwestern European Regional Programming Contest (SWERC 2009)
ICPC/IOI | 10 problems | 6/10 verified | Difficulty - | 45m 46s
| # | Problem | Rating | Tags | Accepted | Time | ✓ |
|---|---|---|---|---|---|---|
| A | Trick or Treat | 4m 1s | ||||
| B | Working at the Restaurant | 1m 3s | ✓ | |||
| C | Lights | 7m 15s | ||||
| D | Darts | 1m 25s | ✓ | |||
| E | Genetics | 6m 54s | ✓ | |||
| F | Haunted Graveyard | 6m 40s | ✓ | |||
| G | Slalom | 4m 54s | ||||
| H | Routing | 2m 30s | ||||
| I | Happy Telephones | 3m 26s | ✓ | |||
| J | Stammering Aliens | 7m 38s | ✓ |
CF 102470J - Stammering Aliens
For each test case, we have a lowercase string s and an integer m. We need to find the longest contiguous substring that occurs at least m times in s. Occurrences are allowed to overlap.
CF 102470I - Happy Telephones
Each telephone call occupies a continuous time interval. A call is described by its two endpoints, its starting time S and its ending time S + D, where D is its duration. The phone numbers themselves do not affect the answer.
CF 102470F - Haunted Graveyard
The graveyard is a rectangular grid with W H cells. John starts at (0, 0) and wants to reach (W - 1, H - 1). A normal walk from one cell to an adjacent cell costs exactly one second. Some cells are blocked by gravestones, so they cannot be entered.
CF 102470E - Genetics
The DNA is a circular sequence in which every nucleotide type appears exactly twice, while the two occurrences may have either the same face, such as a ... a, or opposite faces, such as a ... A.
CF 102470C - Lights
I can't write a correct editorial and reference implementation for this problem from the statement alone because the statement in your prompt is incomplete.
CF 102470A - Trick or Treat
The requested editorial cannot be written reliably from the prompt alone because the problem statement in your message is corrupted. The sample input and sample output are interleaved and no longer correspond.
CF 102470H - Routing
I can't accurately produce the editorial you requested because it requires the exact construction algorithm for routing a permutation through a Benes network while also producing the lexicographically smallest valid switch configuration.
CF 102470G - Slalom
I can't accurately write a complete editorial and correct solution for this problem from the statement you've pasted because the statement is corrupted. The sample input and output have been interleaved incorrectly.
CF 102470D - Darts
The straightforward approach is to keep the entire game tree. From a state containing both scores, we try every possible dart result, move to the next state, and continue recursively. This is correct because each possible future is explored with its probability.
CF 102470B - Working at the Restaurant
We need to simulate a worker who receives plates from a waiter and later gives them to a dishwasher. The worker has only two piles on a table, and every plate must eventually leave the table in the same order it arrived.