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

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

Algorithms Thread Episode 8: Tree Basics

Episode 8 of Algorithms Thread comes out in <90 minutes! This one is a bit more beginner-friendly and covers the following ideas:

  • Graph/Tree Diameters
  • Binary Lifting
  • Tree Flattening with Euler tours

Also, to make sure you have actually learned that stuff, I made a custom Gym set on CodeForces that will last two weeks that hopefully is really good practice for making sure you have learned this stuff. Here is a link to the gym set; it will be available 45 minutes after the video comes out so that people have time to watch the video before starting the set, if they are interested in penalty points. All of the problems in the gym are original to this set (in their flavortext at least, some are simple enough that I'm sure they have appeared in other contests before).

The new gym integration was heavily inspired by Errichto's Matrix Expo set format. Let me know whether it's helpful. I think it might be, but also it's a pretty big time commitment to make it, so whether I keep doing them depends on how helpful they are to people.

If you have any questions or suggestions, feel free to leave them below. I hope you enjoy the problem statements, and I'll leave you all with this:


Solutions

Update:

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

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

Really appreciate your effort for helping beginners to learn new concepts and improve!

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

Looking forward to it!

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

Wait..... How come this is on the frontpage of CF?

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

Errichto and Thread are changing the learning game istg.

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

At this point, since everything's already prepared for it, they might as well add your stuff to EDU

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +198 Проголосовать: не нравится
Spreading CP knowledge!
Screenshot-from-2020-08-17-01-07-07
»
6 лет назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

Thanks, we will try our best to learn new and interesting concepts.

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

Loved the new format ! This helps gain much more confidence in the covered than just watching a tutorial on some topic and not getting custom problems on that topic.

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

Thanks, that’s exactly what I need.

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

The gym problems are very nice for reaffirming one's understanding of tree basics!

For problem D, what was the offline solution you had in mind? The text at the top implies that there exists an offline solution that's simpler than the online solution, but the only thing I could think of is some wack dfs + segtree solution where you update the answer for a query whenever you reach one of its endpoints. That seems way too complicated to warrant explicitly disallowing offline solutions lol.

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

    Yeah it's definitely harder to do offline than online. I was also considering at a small-to-big + dfs with a treeset/segtree which I'm pretty sure is possible and can be done in n*log^2(n) without too much difficulty. The main thing is that this might show up as a sub-problem that you have to answer online, so it's good to be able to do that, rather than finding some complex way that ACs but doesn't actually use the new topics at all.

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

I really love your content

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

Your screencast(s) are really helpful.

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

Please give any hints for second problem.

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

Dear SecondThread,

Thank you for all the hard work you put in daily! Know that it is recognized and greatly appreciated, It’s an honor for our codeforces community to have someone like you.

May you reach every height of success!

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

Hey nice video,

In the tree shown at 36:11, how can I find the sum over the path starting at the node with input time 3 and the node with input time 13? I can think of a way to do it but it requires calculating LCA of the endpoints, is there a way to do it without LCA?

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

Can Someone Explain the Samples of Problem F Please

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

    Yeah, maybe part of it isn't super clear: for each query where x = 0, you can consider pairing things however you want just before for that query. These pairings aren't permanent, they are just considerations for that query. The way of making the pairings is to do minimize the sum of distances between every pair of paired seeds/pots.

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

expecting more and more from all of you

thanks SecondThread

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

The gym-set along with the usual videos format is indeed really nice. Thank you for your hard work.

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

I've just failed my math exam because of secondthread, he says that pi = 3 in 102694A - Circumference of a Tree, so I used pi = 3 to calculate the volume of a sphere and I got 0 marks on that problem. Guys, don't trust secondthread.

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

A bit off topic, but can we expect a video on round 1 problems of hackercup, SecondThread ?

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

Hey guys, I am bit stuck on prblem B, my approach was:

  • start from arbitary node and find the farthest node, call it 'root'
  • from 'root' , do a bfs and find the distance of all other nodes
  • The maximum distance now will be the diameter,now,
  • If distance of some node from 'root' is same as diameter or zero, the answer for this will be diameter+1 , else the answer for this node will be same as diameter

I am getting a wrong answer on test 6. Can someone plz help?

Any general tips to debug will also be appreciated.

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

    There can be multiple "root". Take care of that also

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

    What if the tree is like this?

    Tree

    From node 1 you will find 7 (or 8) as the farthest node. And then from 7 (or 8) you will find 1 as the only farthest node. The problem is that your algorithm will consider only 1 and 7 (or 1 and 8) as all the possible nodes which should increase the diameter by 1, but actually all of them will increase it (1, 7, 8). You can try this example yourself for more details.

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

      Hey Brodicico! Could you(or anyone) please tell me what mistake I am making. (I am continuously getting WA on test 5 and I am unable to figure out what mistake I am making — whether it is the implementation or the logic)

      LOGIC :
      CODE :

      A counter test case with its correct output is highly appreciated.

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

        Try a case where you have a tree in a chain form like 1-2-3-4-5-6-7-8-9. Then connect node 10 with vertex 5.

        The tree will be :

        1-2-3-4-5-6-7-8-9
                |
                10
        

        For node 10 it isn't correct to output diam+1.

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

      bro i am getting correct answer for this one but still my code fails no 4th test case

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

    There's a hint in the video..watch it again....

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

This was a wonderful effort . can anyone give me the link for other episodes.

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

Your screencast are really helpful. Thank You!

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

1006E - Military Problem
Great problem on one of the concepts explained in the video. Highly recommend it!

My solution for reference: 90223865

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

Someone give me a hint on E, please

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

As a beginner, your episode has really taught me a lot about the many application of trees. Thanks a ton for this!

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

Hey can someone recommend a good list of problems which contains different( hopefully all theory) types of problems on graphs and/or trees....It would be much appreciated....

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

can someone help me , I am getting memory limit exceeded in B. https://paste.ubuntu.com/p/6B8kdrvkyh/

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

SecondThread

Any idea for D. Till now , this is how I am going: ( I guess m is always n-1).

  • we need to find the minimum valued edge between sources and destination of the flow network, (as its a tree <or I am wrong here?> and only one path is present between any two nodes).
  • we can do this by storing values of minimum for 1,2,4,8,16.. jumps above for each node, and find them just like we build the jump array in binary lifting.
  • Now we can move to the lca and keep calculating the minimum along both souces to lca and destination to lca, again using the binary lift technique.

Am I going the right way ? ( Wrong answer on 6)

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

Someone give me a hint on F, please

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

My 2-dfs calls in B is receiving TLE, is it expected ?

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

My code for problem B https://ideone.com/dd5gOx with poor English commentary :)

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

Math burned me, yet again!!

SecondThread

For E the products can be as large as 10^500000 ( that is ((10^5)^(10^5)) ) and we have to store approx 10^6 of those.....how can it be done....can I get a hint?

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

The problems are really, really good. Even if they use basic concepts they were not actually so easy (at least for me). I found the fifth problem very cool and challenging if you don't have experience using mathematical functions (I didn't until this problem :D). I give all my respects to the creator of this problemset. Thanks for investing your time in helping others.

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

For question C the code is running on my computer btt it shows runtime error for test case 3

90309168

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

I haven't registered yet does that mean i'll have to wait for next 12 days?

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

Hello, i am currently at problem E and i dont understand how does it is not 1.5 in the second example, at the second line.

Since it is 1-rooted, 1 has value 3, 2 has value 2 and 3 has value 1 , no ??? what did i missed here ??

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

Could anyone please help me with problem E?How to handle such big numbers?

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

I realy enjoy E, although I've made 17 WA.

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

Can someone tell me why bfs doesn't work in promlem A to calculate the diameter. It is giving me tle.

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

    It worked for me, maybe because you're using python and the time is a little tight, try reading this blog to speed up the input and the output. If it doesnt work to you, maybe trying with c++ will be a better way, because I see that the few persons that got AC, their execution time is around to 900ms

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

Hi, this is my first time solving Tree based problems on CF. I am having trouble understanding how to give the edges so that I can construct a tree. For example in the first question, the test case is

3

3 2

2 1

How will we construct a tree with 3,2 as edges and which node will they belong to? How will we construct a tree with this? I have seen some other solutions using arrays but i can't understand them.

Leetcode does it like this-

struct TreeNode {
     int val;
     TreeNode *left;
     TreeNode *right;
     TreeNode() : val(0), left(nullptr), right(nullptr) {}
     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};

I have previously solved on LeetCode where we had to just write the function so I am very new to this.

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

Any hint for problem F? (getting wrong answer)

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

Thank you very much for this effort. I really liked the problems.

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

I solved F by observing some examples, can somebody give proof for F, why this works?

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

    if you supposed a minimal matching where there are only two nodes on each side , and you paired each node with the one in opposite side you'll find that you can minimize more the distances by pairing each node with the one on it's side.

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

    I'm failing to understand the input test cases in problem F, where queries are :

    1 6 2
    2 5 3
    4 3 0
    

    Above, 2 seeds at node 1 and 2 pots at node 6 make 2 valid pairs(path 2->6 goes through edge 3-4). Similarly, 3 seeds at node 2 and 3 pots at 5 make 3 valid pairs. This path goes through edge 3-4. This makes a total of 5 valid pairs.

    6 2 2
    4 3 0
    

    Similarly, 2 seeds at node 6 and 2 pots at node 2 make 2 valid pairs and this path connecting 2 and 6 also cross the edge 4-3. So, total of 5+2=7 valid pairs. But, why is the answer for that query 3?

    I'm missing something here, kindly help!!

    Also, it's written The total sum of the distances between every pair must be minimized to keep clean the air. Does this mean something? I didn't get it.

    • »
      »
      »
      6 лет назад, скрыть # ^ |
       
      Проголосовать: нравится 0 Проголосовать: не нравится
      • It's not required that seeds should placed in the respective same pots which were created while creating seeds in each query.

      • In the above example for the last query we can use 2 pots at node 2 for placing seeds from node 1 or 2.

      The total sum of the distances between every pair must be minimized to keep clean the air

      This means that sum distance travelled by each seed from the source node to node which contains pot should be minimized.

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

Will all the test cases be made public after the contest ends?

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

I am getting TLE in TC 4. I stretched the tree along the diameter and after that if node is added to the end points of diameter then dynamic diameter will increase by 1 otherwise not. My solution is here. Please somebody tell me error in my approach.

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

1 sec time limit is pretty rough for java?

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

Can someone please explain me what's wrong in my logic for B ? I seem to be repeatedly failing test case #6.

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

Can anyone pls provide some test case for problem C? im getting WA on test 4

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

In question no C these are the arrays in my programm my code is runnig is fine in my system btt shws runtime error when i submit can this be a memory issue??

int N, D;
int depth[300010];//depth of node
vector<int> adj[300010];
int par[20][300010];//binary lifting table

Inside main

    memset(depth, 0, sizeof(depth));
    for (int i = 0; i < 300010; i++)
    {
        adj[i].clear();
    }
    memset(par, -1, sizeof(par));
»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

SecondThread, what's the constraint of q in D?

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

Thank you very much for the problemset, it's very helpful! I like how it's not just straightforward "implement LCA and be done with it", but includes some modification that forces you to understand the concept behind it.

I have a question about F. It seems that the observation is

Spoiler

Which seems intuitively true, but how to prove it?

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

      Can i get a hint for problem F.

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

        The problem is strictly linked with the idea of minimizing the sum of distances between seeds and pots, thus the first thing to think is "when is it necessary to cross edge $$$E$$$ when matching a seed with a pot?".

        This is not likely a hint, but let's try to see something intuitively in the following cases:

          R -> root.
         / \
        P   S
        

        Here you have a pot and a seed in the leaf nodes, thus the result in any edge would be 1 since there's no other matching possible/closer/minimum. This would give us a total sum of 2.

               __R__          -> root.
             /       \
            N1        N2      -> nodes.
          /  \       /  \
        2*P  1*S   1*P  2*S   -> amount of seeds/pots.
        N3   N4    N5   N6    -> nodes.
        

        Here our options would be:

        • Match all pots from $$$N3$$$ with all seeds in $$$N6$$$ and the seed in $$$N4$$$ with the pot in $$$N5$$$. This would give us a total distance sum of 4*2 + 4*1 = 12 and the following edge values:
             __R__         -> root.
           3/     \3       -> edge values.
           N1      N2      -> nodes.
         2/  \1  1/  \2    -> edge values.
        N3   N4  N5   N6   -> nodes.
        
        • Another option would be to match 1 pot from $$$N3$$$ with the seed in $$$N4$$$, the remaining pot from $$$N3$$$ with a seed in $$$N6$$$, the pot from $$$N5$$$ with the remaining seed in $$$N6$$$. This would give us an smaller total distance sum of 2*1 + 4*1 + 2*1 = 8 and the following edge values:
             __R__         -> root.
           1/     \1       -> edge values.
           N1      N2      -> nodes.
         2/  \1  1/  \2    -> edge values.
        N3   N4  N5   N6   -> nodes.
        

        Note that the second option is better because we don't need to cross the root edges multiple (extra) times. Thus, matching seeds/pots locally (closer matches) might reduce the total sum. Also, looking at the last example, try to answer the question "when is it necessary to cross edge $$$E$$$ when matching seeds and pots?" thinking locally.

        After solving (or if you still can't solve) the problem look at the spoilers on this thread to clear any doubt.

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

          Thanks bro for your effort, I think i got the key now.

          My Idea
          UPD: Solved!, Thank you bro.
          
»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I am not able to solve circumference of tree problem .. also there is no editorial available .. what to do ?

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

It's really helpful! Thank you !

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

Can some one plz provide a link to their submission for E. I have understood the approach (partially), but having problem to implement it.

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

Great video, thank you!

Also, I think a thing worth mentioning is that segment trees can be directly utilized on incomplete rooted binary trees, while this tree -> Euler path -> segment tree approach helps us reduce the complexity when trees aren't necessarily binary.

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

In problem E SecondThread, I got 4 WA's using Fenwick/BIT Tree but as soon as I changed it to Segment Tress, it got accepted.

Solution using BIT/Fenwick Tree

Solution using Segment Tree

I am unable to understand why it is happening. If anyone has solved this question using fenwick tree, please look at the code and tell where is it going wrong or share your code.

UPD: I got the error. I was constructing the fenwick tree in a wrong manner.

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

Nice guide, really appreciated.

For everyone looking for other problems to apply the tree flattening trick, here are some from CSES problem set:

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

Can someone please let me know why My code fails on test 5(Problem B)

code

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

For problem C: Assume tree like following.

7
1 2
1 3
2 6
2 7
3 4
3 5
2
7 5 1
7 5 3

Is the answer (2, 1) or (2, 3)?

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

Can anyone tell me why I am getting the wrong answer for testcase-4 in problem E, or give me any test case? SecondThread

code

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

Can i get hint for problem F.

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

Can someone please explain me the way to approach problem F.I have been stuck at it for quite some time now !!

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

can anyone tell how to do c

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

Auto comment: topic has been updated by SecondThread (previous revision, new revision, compare).

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

Really enjoyed thanks.

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

SecondThreads java solutions were posted, but if you need A-E in c++: A B C D E F

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

I'm facing a weird error. The same solution is getting accepted in C++14 and getting RE in C++17 for Problem B.

Accepted code

Same code is getting RE in C++17, I tried
1. using memset for dist arrays
2.return 0 for main fn

SecondThread What could be the problem?

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

SecondThread the problems aren't available in the gym contest

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

SecondThread if possible, maybe u can link the video editorial as editorial in the problemset. That may help a little bit

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

249461942 can someone please help for 102694B - Dynamic Diameter why is this failing for test case 6?

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

Wow this is super good. The explanation video is great, the problems are super, really appreciate it!