Invitation to CodeChef July Long Challenge 2018!

Real numbers. Refer to @mgch comment above.

Including zero?(that’s my main concern)

Non-negative includes 0 by default rules.

1 Like

cout << endl;
works for c++… use it whenever u wanna flush…

1 Like

Finally passed all test cases! Weird thing one of the first thing I tried days ago helped me. At that I didn’t use it because it was taking forever in my local pc, but here codechef dealed with quickly:)

strange…

remove your duplicate answers now… as u got attention and reply…

Didn’t have time to implement it, but I guess you can model it it as a graph. If a odd-length cycle exists in a component, then the whole component is “blocked”. Otherwise, for any two gears X and Y, you can find the speed of Y given X… the intermediate gears are quite irrelevant.

Gears? Its a straightforwad DSU - refer here Disjoint Set Union - Algorithms for Competitive Programming

1 Like

Thanks a lot ! I never solved many problems with DSU…just basic ones, i was not aware of it, will have a look at it.

HERE is my code…
Its neat…
DSU (without path compression (u ll understand why if u go with my logic of bool invert))
Hint: assign 0 or 1 sign to each node (for detecting cycle and for detecting sign of rotating)…

Thank you!! will refer it :slight_smile:

yes it is possible to solve in python, I passed mine in just 0.24 seconds.
You can have a look at it from searching my name on the leaderboard

Thats coz they arent uploaded yet. Editorialist is still writing them.

long challenge lasts for 10 days… do codechef hide solutions from editorialist till contest gets ended ? If no , why not still editorialist was able to complete them !!!

Ask that from editorialist himself @l_returns xD. No, he gets all solutions and setter’s explanation.

Sorry guys! It was my fault, Didn’t read the question properly.

Enough of waiting now !!!
Unluckily editorialist gave all editorials of questions I already solved… And editorials for questions I don’t know are not out yet !!!
Contest Lasts for 10 days and editorialist gets solutions from starting of contest… they why this much delay ? If you don’t have time then why to apply as editorialist ???
Please look into this
@admin
@mgch
@vijju123
@melfice
Aren’t 13 days enough for 10 questions…

1 Like

@l_returns: here is author’s brief sketches for the rest of problems.

@melfice had some problems and he promised to finish the rest of editorials in 2 days

1 Like

This link will do… :smiley:
Thank you for sharing this @mgch

1 Like