| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 145 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 134 |
| 9 | maroonrk | 132 |
| 10 | cry | 130 |
|
0
I wrote (out of the contest, unluckily) a binary search which checks every edge and his right neighbour in the path a->b: you can handle all cases except the case in which timea = timea' and timeb = timeb' (where timea is the optimal time to fill from a his part of tree and timea' is the same thing from the next edge etc), but in both cases (if you decide to go right or left in your binary search) it gets 100 points, lol. That's strange D: My code: http://pastebin.com/tenyL8CR |
|
+2
Define The remaining part of the problem can be solved using linearity of expectations. |
|
+6
During the contest i solved B casting every integer in the range [a, b] into a string (using Then I removed the Now on my pc the first solution, with the I got 3 TLEs for this :( |
|
0
I solved it using topological sort on a graph where an edge i->j means that I have to remove i before j. The long thing is to create the graph but it can be done in O(N^2) comparing every pair of segments in O(1) [ here is the long thing, you have to consider some corner cases where the segments are vertical lines ]. Relation is transitive, i.e. if i < j and j < k --> i < k , that's why topological sort works (where a < b means that I have to remove a before b). |
|
I submitted a solution more than 30 minutes ago and still nothing... Website is completely unavailable o: |
|
0
lol I've just solved that problem and I think you've only over-complicated the task. Do you really need LDC[ x ]? And why do you use a segment tree when it is slower and worse to code than a BIT? After calculating the LIS terminating at every indexyou can just find super numbers in linear time. Hint: Suppose you're at index i of the array A and you already know that number A[ j ] (where j>i) is a super number. What can you say about A[i], looking at A[i], A[j], Lis[j] and Lis[i] ? Try on paper, I found algorithm in that way :) |
|
0
yeah i was talking about the problem "Almost Equal" not "Almost Equal Advanced", sorry |
|
0
I've solved it using hashing (Rabin Karp, 2 different hashes to have less collisions) And binary search for every query. Using Rabin Karp during preprocess you can get every hash in O(1) And then just binary search the different char between the two substrings And check the other two parts to be equal. |
|
0
I know man, I always make silly mistakes caused by pressure/stress. Last example: I took part in code jam 1C and I could have scored 55 points (and I could be advanced to round 2) but I made a very silly mistake in the big A so I got only 33 points (the small tests) :( |
|
0
Can someone better explain the proof of the upper bound of O(N * sqrt(N)) of the second approach to problem F? I came up with the same solution but at the beginning I thought it was tle... |
|
0
I missed the big case of C only because I forgot to transform to long long a single variable !!! So, you're not the only one :') |
|
+5
You don't even need suffix automata, I think you can do it in O(N) just with tree DFS and kmp :) |
|
0
Sorry my fault, my code was right but I thought roads in input were correct (i.e. a is closer to the root than b) so it was going on infinite loop. lol |
|
0
I solved it that way but I keep getting TLE on 7th test case. My solution--> http://codeforces.me/contest/519/submission/10136461 |
|
0
I think the solution with trie is better than the hashing one. I haven't perfectly analized your code but maybe the bug is that your hashing is not perfect so I suggest you to implement the trie solution, which is much easier |
|
+6
There's a simple O(N^2) solution (N^2 is an upper bound, actually it is faster I think):
At the end of the whole process you'll obtain the answer :) |
|
+3
Nice problems but server is always busy!!! I submitted the code for A-Bits 10 minutes ago and it's still in queue |
|
+3
Thanks !!! Finally, after "number of graham" submissions, i got AC!!! PS: This is my first comment to comment :D |
| Name |
|---|


