| # | 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 | 157 |
| 2 | adamant | 152 |
| 3 | Proof_by_QED | 146 |
| 3 | Um_nik | 146 |
| 5 | Dominater069 | 144 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | TheScrasse | 134 |
| 10 | chromate00 | 133 |
|
0
I have not done grid paths, but I did not require any optimization in Knights tour. I just used Warnsdorf's rule. |
|
+1
Thanks. ibit gave me the solution. The bound is pretty tight so you have to remove the redundant cases. The optimization you made of returning 0 when reaching vertex n, actually reduces the runtime by more than half and does the trick. Bottom Up or Top Down does not make any difference. |
|
0
I have used the same algorithm. However something in my implementation gives TLE. |
|
+10
You can go to settings in talk to block a user. I don't think you can hide from a user. And your handle can only be changed once during New Year. |
|
0
Hotel queries can be done in O(mlogn). Instead of using binary search, we will descend the Segment Tree, starting at the root vertex, and moving each time to either the left or the right child, depending on which segment contains the vacancy greater than the required rooms. Code |
|
+3
|
|
+8
For Tree Distances I
Is there any proof for this? |
|
0
I implemented the same solution. It passed all tescases. |
|
0
Check whether the Graph is Bipartite. A graph with an odd cycle can never be bipartite. You can do this by running a BFS and coloring the odd and even levels with two colors. If you find any adjacent nodes with the same color, this means they are starting and endpoints of the odd cycle. Run another BFS/DFS to find the odd cycle. |
|
0
I also thought the same thing.
|
|
0
Instead of using |
|
0
I use this implementation. It is from this book. |
|
0
I calculated the complexity. Shouldn't it be O(k(m+nlogn))?. It is still giving me TLE for the above algorithm. Secondly, why did you run a classical djikstra before? you are not using the distance array in the algorithm. |
|
0
13) flight routes give TLE as its O(nmk) |
|
0
Thanks! I was having the same problem. |
|
+1
You can refer to this for STL algorithms |
|
0
Thanks, man. But figuring out the appropriate testcases is the hard part. I guess it will get better with practice. I usually face problems when the sample cases are not strong. |
|
0
Thanks a lot! |
|
0
Auto comment: topic has been updated by sarkarasm (previous revision, new revision, compare). |
|
0
Auto comment: topic has been updated by sarkarasm (previous revision, new revision, compare). |
|
0
Can anyone tell what is wrong with my solution? |
|
0
You can easily prove this by contradiction. Assume there is no more moves possible and the string has both Hence the opposite only wins when there is only 1 or 0 in the string. |
|
-8
Here is my approach and explanation for E1[problem:1371E1] As Yuzu starts with Sort the array and iterate from the back. Let Now, let So, for On simplification, the number of positions for Now f(x) is simply product the positions the numbers can occupy. 85781407 If someone has a simpler explanation for this approach, please let me know |
|
+15
The book is good if you are preparing for an interview(as the name suggests). It some really good tips and insights regarding interviews. But the questions IMO, are average and most of the techniques might be familiar to you. I would suggest LeetCode if you are preparing for interviews. |
|
+8
Depends on what your goals are. If you are looking to improve your overall CP skills I would recommend doing rating wise. You will get to practice a variety of DS and Algorithms. Secondly, not knowing the topic beforehand helps you develop approaches to a problem. If you encounter a new topic, you can read and learn about it. If you still do not feel confident in solving that topic, then you can solve a few questions topic wise. Secondly, some topics might have prerequisites. If you do not know recursion and start practicing DP, you will take a lot more time to learn and end up wasting time. |
|
0
In Coin Combinations II(1636) shouldn't the vector x be sorted? |
|
+4
In my opinion, if you blindly follow one resource, then your growth will be slow. Rather I recommend you practice from different resources as each has its strengths and weaknesses. Also, it gets boring practicing from the same resources. |
|
+7
A2OJ ladders are good practice. You can also try CSES Problemset. |
|
0
It depends on your rank in the contest, not the number of problems you solve. |
|
+4
During a live contest, your solution is not tested on all the testcases as it will increase judging time. So a small number of strong testcases called pretests are used. But sometimes the pretests turn out to be weak. |
|
+5
After the contest is over, your solution can be viewed by anyone. You can then run the solution on your custom testcases known as hacks. if the solution fails, then the hack is succesful. |
|
0
Yes, Exactly. |
|
On
MasterBaiter →
My code passed pretests, while giving wrong output on Sample Test Case, 6 years ago
-12
Seeing your profile, I think you have not participated in many contests. This is the same when pretests are weak. You move on to another question. I know it feels unfair, but those contests are not unrated. It will be unfair to those who actually solved that question correctly. |
|
On
MasterBaiter →
My code passed pretests, while giving wrong output on Sample Test Case, 6 years ago
+3
The checker was wrong. It was fixed later. |
|
0
How is this any different from cases where pretests are weak? |
|
+14
I think the round should be rated. This case is the same as when pretests are weak and your solution passes. Since the hacks work, the checker is actually fixed |
|
+3
I don't know if this is possible, but can you a button which can toggle between the two graphs? BTW great extension! |
|
+1
Can you also add a pie chart of the problem tags solved? it would be really helpful |
|
0
Can Someone explain this? ` |
|
0
Understood this one rather than the editorial. Thanks! |
|
+17
Imposter Syndrome Bro. |
|
+33
This guy made an account and went through all this effort just to prove a point. Hats Off! |
|
+13
Three contests back to back! Thanks for saving us this lockdown |
|
On
ZhouShang2003 →
Why is the 'm' in "International master" and the 'g' in "Legendary grandmaster" not capitalized? , 6 years ago
+7
Yes. That would be cool! |
|
0
Yes. I am having a much better time coding now. |
|
-24
Why? |
| Name |
|---|


