Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Comments

RIP I read it now! There should have been an announcement atleast if the problem statement was updated and new test case was added!

In the problem CR195 how is the answer 136 in case n = 4? We wrote bruteforce and got answer as 120. Can you please explain?

On Learner99CodeMutants Revisited , 5 years ago
0

Firstly, without loss of generality we can assume the tree to be rooted at 1. Let dp[i][j] be the maximum sum(which in turn will lead to maximum mean) that can be obtained by considering the j-connected component in the subtree of node i which includes node i.Now for a node src, if I have the DP table filled for all of its children, how can I fill up the DP table for node src?
Here is the code for your reference. You need to run it for all children u of node src.
Lastly, do not forget to take floor value at the end.

On rielaThe most loved person on CF, 5 years ago
+23

BledDest and awoo, nominated by "998244353"

I learned this trick from meooow. You can check it out here : Link.

What would we do if constraints were small? Use partial sums!
So now we can do similar thing just using map instead of arrays for partial sums.
How to solve D though?
P.S : I think there is even a way of doing it without using maps. I am unaware of that sorry!

0

It is due to the ceil and floor functions being so slow! Check this submissions : 1 2. The only difference here is in ceil function. I generally try to avoid ceil and floor function now! I found a discussion here but am unable to get it. It would be great if anyone can explain some concrete reason behind this.

+2

Me too. Just solved 2 problems :(
I am so baddd T^T

Thanks :)

Also, can you please share your approach for E?

I am pretty bad at explaining things, but nevertheless I will give it a try.

Root the tree at A for ease. Observe that if we choose any vertex from subtree of B as D, and any vertex from subtree of A(but not subtree of B including B) as C, the path between A -> C and B -> D will never intersect.

Now, you can even select any vertex which is parent of B(but not A) as D. In this case, the vertex that are candidates of C are all the vertices in subtree of A — vertices in subtree of chosen vertex D.

This can be calculated by running a DFS with root as A and storing subtree size. Here's my code for reference. I hope its readable.

On rng_58AtCoder Grand Contest 025, 6 years ago
0

Have a look at this tutorial : Link

Bump! When will the tutorial be published?

Got it.. Thanks :)

Thanks for the reply. Can you elaborate a bit more on A?

How to solve A and J?

0

Maybe use long double instead of double! Link

Can the dp be formulated as dp[i][j] = minimum cost obtained upto position i with maximum size being at index j?
I tried doing this way but got WA on pretest 7. Am I doing some mistake?

Could you please share your code?

Yeah figured it out. Thanks for the help :)

Why are you taking x = d[i — k]? Can you elaborate more on that?
UPD : Got it NVM.

Can you elaborate how to dp in E please?

The problems were very good. Thanks for a great contest ^_^

How to solve E and H?

On zephyr_23Binary search problem., 6 years ago
+3

The problem is that you aren't counting the numbers that need to be less than x and are less than x. Say if you encounter a number at mid which is less than x and you need a number less than x, you can't use it for swapping later on. Similar thing needs to be done for greater than x case too. You missed this point and so you are failing in those cases. I hope I am making sense.
Here's my AC code for reference : Link.
The sub_h and sub_l variables in my code are what I am talking about.

Can someone point out why my solution to C fails? Link

Can you please share your code?

Can somebody tell me why my solution to F fails?
Here's the link : Link. Thanks :)

If you group 0 and 1, 2 will belong to other group and say key will be 2 or more. Thus you will get 0 2 0 254 254 which is not desirable!

I don't know if this is the right place but can you answer this question of mine regarding the problem GQR : Link

I didn't get how did you obtain that formula from OEIS. I heard it for the first time here so I am very unfamiliar with it. Can you explain a bit more? Thanks!

Thanks for the link :)

I can't find the link to the problems or check my submissions. Can you provide it?

Seems like April has arrived a day early this year xD

On repeatingWhich IDE do you use?, 6 years ago
0

The only problem is that it doesn't support some features and functions of C++14 and above!

On repeatingWhich IDE do you use?, 6 years ago
0

I too use CLion.. But I have a problem. It frequently displays error saying Executable file could not be linked. I have configured Cygwin. Any help or tips would be helpful. Thanks :)

On KANCodeforces Round #464 (Div. 2), 6 years ago
0

Thanks :)
Our comments have 2 minutes time difference xD

On KANCodeforces Round #464 (Div. 2), 6 years ago
+1

Any idea what was the pretest 5 in C??

Great explanation. Thanks for taking time and explaining!

In the function cntperm , why are you doing temp--?? I am not able to understand this part!

I can't open the All Contests tab... Am I the only one??

Edit : FIXED!!

On qoo2p5HourRank 25, 6 years ago
0

Can you tell the badgewise rank distribution please?

Couldn't even solve A :(

Thank you :)

Hii.. I am new and learnt BIT sometime ago.. Can you please explain me what does compression means in this context?
Link to any resource too would be much appreciated. Thanks :)

Damn!! I had the exact same idea but couldn't implement it...

I enjoyed solving the problems of your previous Codechef round! Unfortunately I have to be at a college event this time :/

How to sleep at night after your solution gets WA because you missed long long in assigning value to a single variable :/ ?
Nice problems btw :)

On JVirakHackerrank WeekOfCode, 7 years ago
0

I was wondering the same!!

Why aren't solutions of other participants visible??
Also as always solution of tester and editorialist aren't visible. Please fix this!!

On slycelotecaide 2.10, 7 years ago
0

I tried parsing Codeforces questions but did not succeed.
I use VsCaide and there are no error messages. It just does not parse task!!

Also, I get the following error when I parse the problem with its URL:
Unable to start program 'C:\Users\Dishant\Desktop\VisualSolution\cf859A\Debug\cf859A.exe'.

I am a beginner and am pretty sure might be missing something silly!! Sorry for the trouble!

On slycelotecaide 2.10, 7 years ago
0

Thanks for the amazing tool!
I am not able to parse tasks through CHelper in Chrome. I read many forums but all in vain. It would be great if u could explain how I can do parsing.
Thanks :)

On UNBEATEN_CODERSPOJ : FREEQUENT, 7 years ago
0

Read the input section carefully! It says that input consists of several test cases. You haven't taken this fact into consideration.
Changed variant of code : link

On rng_58TCO 2017 Round 3B, 7 years ago
-10

Heyy! No screencast since long :(
Everything alright??

Can be easily done by greedy + vector pair!! I got WA cz of missing to typecast answer to long long :(

I used greedy with vector pair!! WA just cz of missing long long :(

Same code passed on adding long long after the contest :(

0

Hey, Can anyone tell me why my code failed in Test #15 of Problem B. Here's a link : My Solution

On adedalicCodeforces Round #421, 7 years ago
+13

+1 :p