Contest is finished, you may discuss problems
My screencast
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Contest is finished, you may discuss problems
My screencast
Name |
---|
Is it really finished? It says "end: 25 Aug 2015, 22:00:00". Though looking at the screencast, now it should be forcibly finished...
It seems both views were by myself, so I think it should be ok
Auto comment: topic has been updated by Egor (previous revision, new revision, compare).
I appreciate that all of you was able to find out link when the contest was still up, but had you noticed that video on that link wasn't available at the time?
How to solve C? And question about B, could you please give me an counter-example for my algo?
Algo is greedy. Start from the leftmost disk to the rightmost. Build machine queue, starting from empty queue. For each disk try to match machine type from the queue. If machine is not found add new machine with certain type to the end of the queue. Calculate max time.
Example,
disk -1: 3-2-1
disk -2: 1-2-3
Start building queue from 1-2-3. Since machine queue was empty from the beginning, after disk(-2) it looks like: 1,2,3. Steps = 4
Start matching disk(-1): type 3 matches last machine in the queue, so add 2 more machines with types 2 and 1. After disk(-1) queue looks like: 1,2,3,2,1. Total number of steps = 5. Got WA on 6th test.
Counter-example:
Correct answer is 6.
Thank you!
If gcd(a.len, b.len) = 1, then we compare each character of a to each character of b corresponding number of times
Thank you, Egor! Your answer and screencast helped me.
How to solve A and E?
A — for each connected component in the graph check that it is bipartite. Then use DP similar to knapsack putting all components there to find out what sum close to N / 2 you can get. DP[x][y] should be something like whether you can get a total of x people in one hall if you put people from last y components. After that you can restore the answer greedily starting from the component containing first scientist, if you can you need to assign him to the first conference hall which will give lexicographically smaller result string.
Thanks.