| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 154 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 146 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 135 |
| 9 | maroonrk | 133 |
| 10 | cry | 130 |
|
0
The code block's display formatting seems to be problematic, these two lines changed:
|
|
0
Since the input format was not provided, I'm not sure. If you want change 1-base index to 0-base index, I think it should like this. ~~~~~ for _ in range(m): ch , x , y = map(int , input().split()) if ch == 1: update(1 , 0 , n-1 , x-1 , y) if ch == 2: res = query(1 , 0 , n-1 , x-1 , y-1) print(res[0] , res[1]) ~~~~~ |
|
0
The K-shortest paths algorithm is a new idea, thank you. The value of k can be quite large, but if the edge weights are relatively large and M is relatively small, it may be possible to take a smaller K, which would result in a relatively good time complexity. |
|
+3
Yes, if it is not a complete graph but a sparse graph, then it is as you said. |
|
+3
|
|
0
The overall idea is correct; the problem lies in this line of code. There's a simpler implementation: remove this line of code |
|
+42
12:00 UTC (Usual AtCoder time) |
|
+3
Personally I think problem D is easier than problem C; it only took me about half the time of problem C. Spoiler: Perhaps noticed this helps me solved D quickly. "It is guaranteed that the sum of n over all test cases does not exceed 10^12." This statement is rarely seen when n is greater than 1e9. Therefore, I guess the time complexity should be O(sqrt(n)). If it were O(log) or O(1), there would be no need to add this strange restriction. Let's discuss b separately:
Here is my code 370783848. Only need to look at the "solve" function at the bottom; the rest of the code comes from the maspy's template lib link.maspy's library is very powerful and free to use, thanks him. |
|
0
Lets consider a sample input R=2,G=2,B=2, thats the fisrt case in your code (R>=G>=B). The structure is "R_R". Then u fill the blank with G, so u get "RGR". Then, cause B is not 0, then u add B at begin and end. Finally u get "BRGRB", the length is 5. One possible answer can be "RGBGBR", the length is 6. I think the "R _ R _ R _ R" structure is not necessary. |
|
0
Thanks for introducing the tool to auto expand includes, that's really cool |
|
+9
some problems to initialize the "lg" array. I modified it and got accept282181464 |
|
0
Runtime error may be caused by division by zero,if nn is 2 |
| Name |
|---|


