Блог пользователя Aksenov239

Автор Aksenov239, история, 5 лет назад, По-английски

Hello, everybody!

We would like to invite you to participate in the Mirror of The ICPC World Finals Moscow Invitational Contest. The original contest was made for the teams who cannot come to The World Finals in Moscow. They were competing for the medals and glory. The Invitational contest has already passed and the results will be revealed on October 5th.

The mirror contest will be held by almost standard ICPC rules with 10 to 14 problems. The difference from the traditional ICPC format is that your team can use three computers instead of one. The problems are expected to be of The World Finals difficulty. Also, the round will be unrated!

The problemset was prepared by NERC Jury Team with the help of many other people. The chief judge is Roman elizarov Elizarov. The jury members are Pavel PavelKunyavskiy Kunyavskiy, Georgy kgeorgiy Korneev, Evgeny eatmore Kapun, Ilya izban Zban, Niyaz niyaznigmatul Nigmatullin, Vasiliy SirShokoladina Mokin, Daniil danilka.pro Sagunov, Gennady tourist Korotkevich, Oleg snarknews Hristenko, Egor Egor Kulikov, Borys qwerty787788 Minaev, Pavel pashka Mavrin, Mike MikeMirzayanov Mirzayanov, Anton Paramonov, Bruce bmerry Merry, Zachary Friggstad Friggstad, Jakub Wojtaszczyk, David Van Brackle, and myself. (I hope I haven't missed somebody. :P)

I hope you will like the contest! Good luck and have fun!

UPD: The editorial is available here.

  • Проголосовать: нравится
  • +300
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -81 Проголосовать: не нравится

Will we get certificate of participation???

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +22 Проголосовать: не нравится

For the first time ICPC WF problems will get CF ratings (in problem-set page).

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +177 Проголосовать: не нравится

Problems are cool, recommend to participate, but if you are not div1, it will be too hard and sad for you.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -9 Проголосовать: не нравится

Can anyone tell the maximum team size please? Thanks ;_;

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится
what does it mean?
»
5 лет назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Anyone wants to team up with me ?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

Where can I find the live leaderboard of ICPC WF?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +43 Проголосовать: не нравится

How to solve L ?

  • »
    »
    5 лет назад, скрыть # ^ |
    Rev. 5  
    Проголосовать: нравится +58 Проголосовать: не нравится
    Hint 1
    Hint 2
    Hint 3
    Hint 4
    Our Solution
  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +14 Проголосовать: не нравится

    Here is a very overcomplicated (I have no idea if this indeed is the solution) and ugly (we managed to fit this in 1880ms) idea.

    We use binary search for the answer. For each $$$W$$$, we check if $$$W$$$ can be the width when we finish the run (hence answer will be $$$W - \sum c_i$$$)

    To check for each $$$W$$$, we use union-find and check the nodes in reverse order. We start with $$$W$$$, and subtract weight every time we eat candy. When we eat sufficiently many candies, width is reduced enough and new edges are now open (thus UF works).

    Although we don't know where to start (i.e, in the original problem, where to end), we can check as "if we started at $$$x$$$, can we reach $$$y$$$" with UF.

    To do this, we maintain for each component of UF, set of next-extendable vertices. When we eat a candy, we have information in the form of "by taking this component as a whole, we can decrease our width by $$$x$$$" and for all extendable vertices from this component, we can merge those vertices with current component, increasing $$$x$$$ and possibly opening new edges.

    When merging, this 'set of next extendable vertices' should also be merged. Here we use small-to-large trick. Also the set can be maintained as priority queues.

    Summary : Binary search with (DSU + priority queue extendable vertices + small to large). Time complexity is $$$O(n \alpha(n) \log^2 n \log 10^{9})$$$ which looks horrendous.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +53 Проголосовать: не нравится

Will you make others' solutions visible?

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +36 Проголосовать: не нравится

Where can I upsolve the problems?

Also, Is this the intended solution in M? (It passed)

Spoiler
  • »
    »
    5 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +8 Проголосовать: не нравится

    In fact, only output 0 and 1 is enough to pass M. XD

    • »
      »
      »
      5 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится

      How to find the proper 01 string ?

      • »
        »
        »
        »
        5 лет назад, скрыть # ^ |
        Rev. 2  
        Проголосовать: нравится +10 Проголосовать: не нравится

        I have used evolutionary algorithms and I got 86%:

        code
»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

How to solve H ?

  • »
    »
    5 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится 0 Проголосовать: не нравится

    Pair up brackets using a stack and build such tree:

    Spoiler

    Note: 0 is root there.

    How can it be done? When you meet '(', add its ID to stack, When you meet ')' pop the top of the stack and add this ID to its parent. When you meet '-' just ignore it and the next character.

    Now let's write recursive function int get_order(int ID). It works lazily. If order is already computed return it. Otherwise if there are no children of this vertex then the order is $$$0$$$. Otherwise let's merge all the children into parent's order.

    The answer is get_order(0).

    Code: 130485662

    Code
»
5 лет назад, скрыть # |
 
Проголосовать: нравится +60 Проголосовать: не нравится

Will there are be a mirror of the ICPC WF on the 5th of October?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

How to solve B ?

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +10 Проголосовать: не нравится

    Assume the ranges are $$$[l_i,r_i]$$$ where $$$l_i \lt r_i$$$. You can show that $$$[l_j,r_j]$$$ intersects this if ( $$$l_j \leq l_i$$$ and $$$l_i \leq r_j \leq r_i$$$ ) or ( $$$l_i \leq l_j \leq r_i$$$ and $$$r_i \leq r_j$$$ ).

    Now, we will draw these $$$[l_i,r_i]$$$ on the eucledian plane. We notice that those intervals that intersects $$$[l_i,r_i]$$$ actually form 2 rectangles on this plane. So we can just maintain some 2d data structure. Since one side of the rectangles extend to infinity, we can use a priority queue as one of the layers of this 2d data structure.

    code

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +31 Проголосовать: не нравится

When the practice submission will be allowed?

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +10 Проголосовать: не нравится

has someone solved L with offline queries of searching the narrowest edge on a path in mst? my approach with sqrt-decomposition is getting wa3 and I don't know whether it's bug or solution is wrong

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +21 Проголосовать: не нравится

It is so funny that my team's solution for K is the fastest. We just did $$$N=61$$$ maximum independent set and copied the fastest solution for MIS from yosupo's judge. Surpringly, it ACs.

code

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +21 Проголосовать: не нравится

How to solve G?

+Is there a scoreboard for official WF Invitational Contest?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +95 Проголосовать: не нравится

A dragon curve related problem :PA2011 5A szl

Problem D is much easier than this PA problem. Since you only need to locate the point here. During the contest, I just found the code I wrote about 10 years ago and passed.

BTW, in this PA problem, you need to answer the number of consecutive lines in a strip. I tried hard and didn't solve it when I was young. And I didn't have another try these years, so I still don't know how to solve it yet.

If anyone knows the solution to this problem, please let me know. Thanks.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +28 Проголосовать: не нравится

Sorry to ask, but is there any access to virtual participation?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +23 Проголосовать: не нравится

How to solve problem I(Interactive Rays)?

  • »
    »
    5 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится +8 Проголосовать: не нравится

    First we can rotate the plane to make sure the center is above the x-axis and the circle doesn't cross the third quadrant. Next I use binary search to find two rays $$$a:(0,0)\to (x_1,y_1)$$$ and $$$b:(0,0)\to (x_2,y_2)$$$ that are almost tangential to the circle.

    Then I enumerate all possible radius $$$r$$$($$$r$$$ is an integer not greater than $$$10^5$$$ so it's ok to do so)。With the distance between $$$a$$$ and the circle (let's call it $$$d_1$$$) and it's radius $$$r$$$ we can work out the coordinate of the center $$$(x,y)$$$ (with some senior high school geometry). I also make sure that $$$(x_1,y_1)$$$ lies in the second quadrant and is as close to the circle as possible (so if the circle doesn't cross the second quadrant, what I will get is $$$x_1=-1$$$ and $$$y_1=10^5$$$). Because of the constraints above (the bolded part) we can see that $$$d_1$$$ is always useful information (which means that $$$d_1$$$ is not $$$\mathrm{distance}((x,y),(0,0))-r$$$, this infomation is useless because it's too easy to get and we can't fix $$$(x,y)$$$ simply with $$$r$$$ and $$$\mathrm{distance}((x,y),(0,0))-r$$$ : we need more infomation : $$$d_1$$$)

    picture

    After fixing $$$(x,y)$$$ we have the whole circle, so we can calculate the distance between the circle and $$$b$$$, and check whether it is equal to what the interactor outputs. If yes, then $$$(x,y,r)$$$ is the answer, otherwise go through other radii until we find out the answer.

    the code

    (I'm a Chinese student, sorry for my poor English.) I spent four hours on the problem (from 9:30 p.m. to 1:30 a.m!) so I don't have time to help my teammates lol

»
5 лет назад, скрыть # |
Rev. 4  
Проголосовать: нравится +22 Проголосовать: не нравится

I almost solved M... I got like 99% of the way to an accepted solution... but couldn't make the final leap. I wasted 3 HOURS faffing about like an idiot.

Spoiler

I want to scream. I feel like a tremendous idiot. I think this will haunt me for the rest of my life...

»
5 лет назад, скрыть # |
 
Проголосовать: нравится -18 Проголосовать: не нравится

Can the editorial be opened without Google?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

How to solve A?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +16 Проголосовать: не нравится

I have a question regarding the editorial for problem B.

Otherwise, we are joining two components on the same depth. Let’s say A is to the left of B (so, R(A) < L(B)). There can be at most one component between them, which is on a smaller level.

In this case, 3 and 6 have the same depth 2 but there are 2 components between them (14 and 58). Did I misunderstand something?

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Anyone know the members of Peking University team? Peking U (Wang, Yang, Guo)

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +26 Проголосовать: не нравится

Can you change settings to display (failed) tests after the contest? Like in any CF round. I still can't fix my WA on test 102 in 1578I - Interactive Rays.

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

could anyone help me with problem E please, I,ve written a code but I get TLE on test 3, this is my code:

#include <bits/stdc++.h>
using namespace std;
int main(){
    int TC;
    cin>>TC;
    while(TC--){
        int h, p, rem = 0;
        long long n, ans = 0;
        cin>>h>>p;
        int i = 0;
        while(i < h){
        	n = pow(2, i);
            if(n <= p){
                ans++;
            }
            else{
                n -= rem%p;
                ans += n/p;
                rem = p - n%p;
                if(n%p) ans++;
            }
            i++;
        }
    cout<<ans<<endl;
    }
    return 0;
}

thnx in advance.

»
4 года назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Problem E: I submitted a solution which I think shouldn't result in TLE but it is resulting. Can anyone point out possible mistake. I am failing to find any.

My solution: https://mirror.codeforces.com/contest/1578/submission/142363694