| # | User | Rating |
|---|---|---|
| 1 | jiangly | 3810 |
| 2 | Benq | 3676 |
| 3 | Kevin114514 | 3655 |
| 4 | maroonrk | 3463 |
| 5 | strapple | 3447 |
| 6 | Um_nik | 3387 |
| 7 | heuristica | 3322 |
| 8 | turmax | 3317 |
| 9 | tourist | 3307 |
| 10 | jiangbowen | 3291 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 156 |
| 2 | nik_exists | 150 |
| 2 | maspy | 150 |
| 4 | Um_nik | 141 |
| 5 | Errichto | 139 |
| 6 | adamant | 137 |
| 7 | AmShZ | 136 |
| 8 | BledDest | 132 |
| 9 | maroonrk | 131 |
| 10 | qwexd | 129 |
|
+8
Solved all problems with Haskell. I really like your problems! :D :D :D |
|
0
It was hard to find a solution during contest, but after reading the editorial the solutions were pretty clear and easy to understand. Also implementation was not diffcult. This is the first round I was able to solve all problems. Thanks for really well-made problems, alex256. |
|
0
I misunderstood the problem. It's that any two elements can be swapped, not two adjacent elements. |
|
0
A path should contain exactly one of arrows in the picture. (there are A up-arrows and B right-arrows)
So, the answer is:
|
|
0
In fact it's wrong. I'm finding a new formula. But the idea was: |
|
0
To reach from (0,0) to (X,Y) you need to go right X steps and go up Y steps. Let's regard a step as an arrow. If there is no building, you can make combinations of X right-arrows and Y up-arrows. That's C(X+Y,X) or equivalently C(X+Y,Y). Now, there is a building that covers (A,B) to (A+N,B+M). Let f(X,Y) be the number of combinations can be made with X right-arrows and Y up-arrows. That is, f(X,Y) = C(X+Y,X) = C(X+Y,Y). Then the number of pathes is as follows: f(X,Y) — f(A+1,B+1)f(M-2,N-2)f(X-A-N+1,Y-B-M+1)
|
|
0
I don't understand your code but this is my iterative DP code. It took me some time to debug an out of array bound error :/ http://codeforces.me/contest/431/submission/20790745 Let the root's depth be 0.
The answer is the sum |
|
0
I found the problem. it was modulo operation: When I calculate I popped that final modulo calculation out to another loop and now it gives me correct answer. |
|
0
I tried to implement your formula but it gives me some negative intermediate result. With |
|
0
My attempt to Div2 D (Ant Man). is it valid? mark mark ... doing like this, we get a greedy path: s — y[1] — y[2] — ... — y[n-2] — e For convenience we can say s = y[0] and e = y[n-1]. Let's assume this is not the optimal path. then there exist some i,j such that exchanging y[i] and y[j] decreases the total cost. But exchanging y[i] and y[j] causes following change: from
to
But
There is contradiction. Therefore the greedy path is optimal. |
|
0
Haskell is only functional language I know. |
|
0
Well just call me codeonwort :) |
| Name |
|---|


