| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3611 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | Radewoosh | 3415 |
| 8 | Um_nik | 3376 |
| 9 | maroonrk | 3361 |
| 10 | XVIII | 3345 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 162 |
| 2 | adamant | 148 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 143 |
| 5 | errorgorn | 141 |
| 6 | cry | 138 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 10 | soullless | 133 |
|
-8
There is a typo: 24 * 1 = 1 Should be: 24 * 1 = 24. |
|
0
can you explain about the second argument in your |
|
0
The input is n<=3*10^5, m <= 9*10^5, about 10^7. It's just too large for python. My C++ solution cost 375ms and my python solutions are always 10 times slower. So I guess python need about 4 seconds for each test case. |
|
+9
I use segment tree, too. I've got some MLE after some TLE and finally I forgot to use |
|
+4
You shouldn't And you use insertion sort which is O(n^2). I think it will timeout before finishing input. |
|
0
When the data scale is too large, we will lost some interesting solutions. It's also unfair for some dynamic languages since a loop with 1000000 times may cost about 1 sec. So I think 10^3 or 10^5 is fine. |
|
0
Actually, it is the correct understanding. |
|
0
You guys use hash without handling conflict, and still got ACCEPTED! How unfair... I found a nice c++ solution(3100030) in my room that use My first attempt was a Python solution using a Trie, which is O(n^2). It got TLE, saddly. Then I was forced to translate the Python script into C++. |
|
0
dp[i][j][s] = k, means there are k ways to accomplish event dp[i, j, s] = dp[i-1, j-1, s — len[i]] * j + dp[i-1, j, s] |
|
+1
f(n) = f(n-1) * (2^m — (n-1) — 1), f(1)=2^m-1. Here 2^m — (n-1) -1 means you have this number of ways to append a number to the valid sequence with length n-1. "-1" since you cannot use 0. |
|
0
I think few OJs have command line submit tool because they are afraided that the users submit too fast. |
|
0
In 235B, what do you mean by: |
|
0
Oh, thank you for translating my Python code here. * P.S. It's ray0(4)0123 |
|
+3
I got this solution 5 minutes after the contest, saddly. Then I waited hours for the system test to end. Finally I got 1AC. |
|
+11
Let E[i, j] be the excepted score for clicks from i to j(inclusive). Let L[i, j] be the excepted 'o' s starts from left, of clicks from i to j. Let R[i, j] be something like L[i, j]. Then we have: , for any i < k < j. Think about: If we got x 'o's in clicks [i..k], y 'o's in clicks [k+1..j], then score x^2 is calculated in E[i, k], y^2 in E[k+1, j], and we actually need (x+y)^2 = x^2+y^2+2xy. And since R[i, k] and L[k+1, j] are independent, the 2xy part is calculated as 2 * R[i, k] * L[k+1, j]. Now we take k = j — 1, i = 0, and let e[j] = E[0, j], r[j] = R[0, j]: |
|
+1
You are purple now. |
|
+7
I skipped my class to play in the contest. XD!!!! |
|
0
The first argument of recfib, namely n, will not affected by m. |
|
0
2251104 Even shorter(7 lines) with functional style. Accepted. |
|
0
Actually, you don't need so many '%m' in python. For example, it will convert to Btw, after I copy your code to my editor, the first thing I do is to remove the import line and replace sys.stdin... by raw_input().split(). |
|
0
Your code cannot pass the tests. You put the '%m' in wrong places. After my modification it passed. And, spliting the long long See, it's only 80 chars. You don't even need to break the line. |
|
0
Nice solution! Can you explain that the meaning of (a, b) in a, b = recfib(n, m) I guess a is the n(th) fib number. But what's b? |
|
-6
Well, I've tested your code. I fount that hypot is very slow. use condiction: sqr(dx) + sqr(dy) <= sqr(r), would be much faster. Solved in 50ms.
|
|
+3
Your idea is cool! It's, choose k pairs of brackets from the n-1 gaps, C(n-1, 2*k). Nice solution with Python.
|
|
+5
I didn't notice this until I saw hex539's post. I passed pro.C by a construction method
something like: 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 1 6 7 8 9 1 6 7 8 9 2 => 2 6 => 2 6 10 11 12 3 3 7 3 7 10 4 4 8 4 8 11 5 5 9 5 9 12 ... |
|
0
I didn't notice this until I saw hex539's post. I passed pro.C by a construction method 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 |
|
+3
Yes, since a man can only be invited 0 or 2 times.
At this view, a Day is actually a node, a man is an edge, the problem then becomes so obvious |
|
0
Can you tell me how to contact the administrator of the judge machine? Because I think installing numpy for Python is not a bad idea.
|
| Name |
|---|


