Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
Tutorial is loading...
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Name |
---|
"Will be translated soon": Waiting for translation...
should be inside the maximum function.
Similarly, for zhenya.
Sure, fixed. Thanks!
Any idea why my submission for 729C http://codeforces.net/contest/737/submission/22410492 is exceeding time limit (on test #9). Please help to check.
Have you tried fast I/O?
Can someone please suggest some reading materials for learning graph matching? =)
For problem C, I do not understand the following statement:
if x ≤ f, then it is possible to ride in the fast mode min(x, f - x) kilometers.
How did you obtain the expression min(x,f-x) kilometers?
Let the number of km in fast mode be k. Then the number of km in slow mode in x — k. So, we have the equation: Fuel used = 2*k + (x — k) <= f -> k + x <= f. Therefore, k <= f — x. Also, k <= x because we stop when we reach the next station. Therefore, k = min(x, f-x).
I had some trouble understanding Div2 D solution, so I'll explain it in more details.
The solution is actually an application of the pigeonhole principle.
Let s be the maximum number of positions where you can place a ship (of course, already considering those k misses of the input). The trick: reduce the problem to its complement! In other words: what is the maximum number of misses we can still make? The answer: m = s - a. If we shoot m ship slots once, an additional shot will hit some slot a second time (by the pigeonhole principle), or will hit a ship. So if we choose m + 1 distinct ship slots to be shot once, at least one of the shots will hit a ship.
In Financiers Game, shouldn't the "difference between the sum" mean the absolute value of the differences?