| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | adamant | 152 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 144 |
| 5 | errorgorn | 141 |
| 6 | cry | 139 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
|
+5
That's not a counterexample to greedy but rather to either not handling overflows or 0's correctly. Also, greedy does work. |
|
0
Did you handle overflows? |
|
+7
Dang you are a cool guy |
|
+5
Can you explain the motivation behind of using this inversion operation and also why simply using this operation is correct? |
|
0
This problem can be done in O(m+n) you don't need BIT |
|
+1
why not just use PC^2 |
|
0
not sure though |
|
0
Since A,B <= 10^9, there are only 2^9 different numbers consisting of only 3's and 5's. Precalculate these and put into a list, making sure that you do not put a number that is divisible by any of the numbers already in the list. Let F(A) = # of law numbers in the interval [1,A]. Then we seek F(B)-F(A-1). F(X) can be calculated as follows: for i = 0 ... size(list) d = list[i], ans+= X/d-F(X/d) ; return ans; |
|
+1
yes |
|
0
same for me |
| Name |
|---|


