| # | 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 |
|
0
Yup, this one. |
|
0
D had nothing to do with the elements' range. |
|
0
D was fun to solve. I saw a tougher version of E somewhere else, maybe in a previous CF contest. |
|
0
Smart way to earn a CNIL T-shirt and thanks for the link |
|
-15
There's a neat observation here that you missed. Observation You require 8 operations to take you from 8 to 4. You require 4 operations to take you from 4 to 2. You require 2 operations to take you from 2 to 1. You require 1 operation to take you from 1 to 0. So, in general, it takes you pow(2, K) operations to take you from pow(2, K) to pow(2, K-1). And any number is nothing but the summation of powers of 2. So, for 13 which is 1101 it'll take you Ans(1) + Ans(4) + Ans(8) operations to reach 0 :) |
|
0
Use a multiset or a priority queue. Insert and removeMin are straightforward now. For getMin, keep on removing the smallest element and keep on incrementing the count until the removed element is smaller than the getMin output given. If now, the multiset is empty or the smallest element in it is greater than the getMin output given increase count by 1 (it accounts for adding the getMin output given by an insert operation). |
|
+5
I guess people are making fake ids just to hack those submissions afterwards. Deliberately a stupid if case is added to be hacked afterwards XD. The hacked guy likes 78788 a lot I guess. One more of his solutions from another contest using his fake id Noob_is_back got hacked. See this 87193319 and you'll find 78788 again in the code. The hackers are still grey :) |
|
0
Yes |
|
+5
Yup, I verified on my local machine. This code actually outputs YES. AlFlen Can you please have a look at this. |
|
0
Would this work for F?. First, co-ordinate compress the segments. After that, sort these by ending indices. Maintain a dp array where dp[i] = size of optimal subset where all segments have ending indices <= i. Consider the Kth segment to be the last segment included in our optimal subset and it's starting and ending indices to be L and R respectively. Loop through the points from R->0 on the co-ordinate axis, then, dp[R] = max(dp[R], number of segments inside range [L,R] + dp[L-1]); The maximum of dp[i] would be our answer. I think this is the same idea as the editorial, couldn't understand that one exactly, so came up with this. Note: The kth segment is considered to be inside [L,R]. |
|
+1
.....where ai is the (index) number of (the) subsequence, the i-th character of s belongs to. Even if it wasn't clear to you, it was kinda obvious :) |
|
+2
Cheating and still Cyan :) Stop cheating, you'll love it when you next become Expert. |
|
0
Yup, The deciding parameter for the series is actually the second number i.e, sum + i*i. I get it now. Thanks. |
|
0
Dsxv, could you please clear this for me. Won't taking mod here change the number itself. It'll yield the wrong number when used further, right? For instance, for x=1, we get the first 15 numbers as this: Output for x=1 1 10 100 1000 10000 100000 1000000 10000000 100000000 1755647 17556470 175564700 757402647 586315999 871938225 |
|
0
Compile it with: Execute and redirect the output with: |
|
0
DeadlyCritic, In this problem, ansv needs to be stored modulo M. But, particularly in this task, M can be any integer in the range [2,109]. It would've been trivial if M would've been any prime integer, but how do you calculate the inverse of dpv+1 now? UPD: I understand it now. Thanks. For anyone who'd like to see how exactly prefix products help us here can view this submission. |
|
0
I take sufficient time for Problem A. The objective is not to mess up at the beginning even if it consumes 5-10 mins. Don't let anxiety build-up at the very start. I usually solve Bs fast. Moving on to Cs and Ds. For them, I discard lengthy cumbersome solutions that come to my mind. I take 10-15 mins more for Ds especially to arrive at an elegant solution. This does 2 things for me.
For someone at your level of competency, ignoring Es and Fs is not what you want. |
|
+1
Can you help me out. Nothing happens when I fill in my codeforces handle and press Enter. |
|
0
I tried it and got a warning. Thanks for this :) |
|
0
Auto comment: topic has been updated by vagi (previous revision, new revision, compare). |
|
0
Yeah, I framed the sentence incorrectly. Maybe I shoud rephrase it. |
|
0
Yes, I mentioned that on being empty it returns an unsigned 0. No doubt, it returns an unsigned int always. |
|
0
Updating the topic. A better way indeed! |
|
0
Auto comment: topic has been updated by vagi (previous revision, new revision, compare). |
|
0
While removing Moreover, while considering
Please, can anybody confirm the correctness of these two claims? |
|
0
You don't have to worry about them. Also, what sense does it make to give your blog a MiFaFaOvO VS tourist title? |
|
+4
I ran and got AC with your code by replacing |
|
+1
Good sorting techniques are O(nlogn). There's no sorting technique with a complexity of O(logn). You sort all the numbers for every iteration of the for loop so your complexity turns out to be O(n*nlogn). Use heaps to do what you intend to do. Sorting for every iteration will time out here. |
|
0
Here's my Stackoverflow answer for this. See here... You may add 26 more nodes to incorporate capital English characters as well... |
|
0
You may use fenwick trees. Initialize the fenwick tree array, say To check if a smaller number appears between two ends, say This is pretty much the idea. |
|
On
25DinRatingDouble →
Looking for a group to do Mashup Contests Everyday [1500 — 1899], 6 years ago
0
Interested! Add me. |
|
0
If n would have been small the problem could have been easily solved by linear regression in O(n) instead of finding a pattern. Just maintain a boolean array arr to donate winning or losing at that index. just output arr[n] now. |
|
0
Thanks for the explanation! I get it now |
|
0
I think one person cannot be in more than one component as if he's in more than one component those components cannot be disjoint as he'll be friends with people from both components. I'm still not very clear about problem C. Can somebody explain the solution once. |
| Name |
|---|


