Dear CodeForces,

I added one interesting team contest for preparing ICPC World Final into gym!

Every year National Taiwan University will host selection contest in order to determine which team will go to World Final. This year, I host this contest. Ideas of most problems are came from me. Hope these problems can let everyone feel interesting!

I set the start time of this contest as 13:30 UTC. If you have no time in this time slot, don't be sad. You still can choose any time after that to enjoy the contest.

**UPD: Reminder : The contest will start in around 6 hours from now.**

Auto comment: topic has been updated by dreamoon_love_AA (previous revision, new revision, compare).Contest starts in ~2 hours.

how to solve

EandI?Roughly speaking,

Ecan be solve by divide and conquer + segment tree with time complexityO(n(logn)^{2}) and there are many similar problem such as ARC064 pF. This problem can also be solved with time complexityO(nlogn). But the detail of implementation is quite hard and I guess the constant in time complexity is large. If you have interesting in such method, you can read this paper.Ican be solved by connecting leaves from bottom to up greedily.I have invented a brute_force idea and AC problem E..

In fact, when we were testing problem, peter50216 also give a not clear time complexity algorithm and pass all tests. But I think it will take much time to do that, so I determine to ignore this reality situation >_<

I have generate a test that my code will TLE out of 10s

and I think I must implement link cut tree to get a

reasonable time complexity ,but it is too complex

I think the method given in that paper is not correct. It uses a divide and conquer method and claims that the contribution of the "left" to the "right" can be computed in linear time. Let {

a_{1},a_{2}, ...,a_{k}} be the points whose DP values are used to compute pointb's DP value (in the naive DP solution of problem E). Leta_{i + 1}be the "father" ofa_{i}for anybandi. The paper claims the "father" relationship induces a forest. But this relationship is not well-defined. Although one pointacan have at most one "father" considering all differentb's, whether ithasa "father"or notdiffers.(This gives a simpler algorithm based on that one in the paper that works in time?)

UPD: I implemented this algorithm and it works fast. (http://codeforces.com/gym/101234/submission/24290713) My algo is similar to the one in the paper except for the part for which I used dsu costs only constant time in that paper. Could you guys implement the paper's algo proving my being wrong?

Can somebody give me any suggestion to solve problem A? I got time limit exceedeed on test 14. This is my code

Thanks in advance!

thanks

wooooooooow

ساخت وبلاگ — ساخت وبلاگ — ساخت وبلاگ

I thought that E and I were haredest problems. and A and F were interesting. I solved E with sqrt decomposition and I with Tree DP. O(N (log N)^2) solution of E looks interesting. I think it was a great contest. Thanks for exciting problems!

E can be solved by link cut tree O(n*log(n)^2) if you use divide and conquer and record virtual edge it will be O(n*lg(n)) and will be easier than link cut tree. I hope admin can add some tests and challenge my solution..

I add the tests what you say before now...

I still use O(n^2) solution get AC,but seems constant factor in the last test is 1/32.. I don't know if it is the worst test case..

Is there a reason why the contest is not accessible anymore?

Now the contest reappear.

wonderful mromlems

Could someone tell me how to solve G? I want to solve it with binary search but get TLE on test 3. Thanks a lot!