Hey All!

**Topcoder SRM 760** is scheduled to start at 21:00 UTC -4, June 12, 2019. Registration is now open for the SRM in the Web Arena or Applet and will close 5 minutes before the match begins.

The round is prepared by teja349 and tested by Errichto

This is the third SRM of Stage 4 of TCO19 Algorithm.

**Stage 4 TCO19 Points Leaderboard** | **Topcoder Java Applet** | **Next SRM 761 — June 22, 11:00 UTC-4**

Good luck to everyone!

There's a typo in the title, perhaps you meant SRM 760?

Auto comment: topic has been updated by hmehta (previous revision, new revision, compare).Starts in 5 mins !

Recently I got some time to start doing Topcoder, but I am really surprised to see that there are just about 250 participants in a single round. I heard that there was a time when Topcoder was very popular. Also the problems are nice and require insights. Does anyone know why it becomes not so popular all over time?

Hard

It's a bit like posting a link to a tutorial on flows when a problem requires a flow.

How to solve 250 Div 1 ? I've tried but there were a lot of cases and I could not control all of them.

The first round has $$$C(N,N/2)$$$ ways to choose which teams play home and then $$$(N/2)!$$$ ways to match teams with each other. In the second round, home-away teams swap and you need to rearrange away teams so that nobody would play the same match. You need permutations that don't have an element $$$p_i = i$$$. This is called dearrangements and there's a recursive formula for that.

Thank you a lot ! :D

Darn, I didn't pay attention to the "nobody would play the same match".

Beautiful problem, very elegant and "could actually happen" in the real world — maybe not with n=500000. :-)