Автор awoo, история, 6 лет назад, По-русски

Привет, Codeforces!

В Oct/25/2018 17:35 (Moscow time) состоится Educational Codeforces Round 53 (Rated for Div. 2).

Продолжается серия образовательных раундов в рамках инициативы Harbour.Space University! Подробности о сотрудничестве Harbour.Space University и Codeforces можно прочитать в посте.

Этот раунд будет рейтинговым для участников с рейтингом менее 2100. Соревнование будет проводиться по немного расширенным правилам ACM ICPC. Штраф за каждую неверную посылку до посылки, являющейся полным решением, равен 10 минутам. После окончания раунда будет период времени длительностью в 12 часов, в течение которого вы можете попробовать взломать абсолютно любое решение (в том числе свое). Причем исходный код будет предоставлен не только для чтения, но и для копирования.

Вам будет предложено 7 задач на 2 часа. Мы надеемся, что вам они покажутся интересными.

Задачи вместе со мной придумывали и готовили Роман Roms Глазов, Адилбек adedalic Далабаев, Владимир vovuh Петров и Иван BledDest Андросов.

Удачи в раунде! Успешных решений!

А вот сообщение от наших друзей из Harbour.Space:

Hey Codeforces! We want to remind you that the Scholarship for the Master’s in Robotics programme, which starts on January 7th 2019, has an application deadline of November 12th, 2018.

Harbour.Space University and Remy Robotics are collaborating to offer graduate students from anywhere in the world a once in a lifetime opportunity, a fully funded scholarship for Harbour.Space University’s Master’s Programme in Robotics.

The scholarship value is €34.900 and it includes:

  • Complete coverage of the University tuition fee (€22,900)

  • Internship at Remy Robotics (20h per week during 1 year)

  • €1,000 per month during 1 year (Internship earnings)

Apply here

UPD: Мы с vovuh будем ждать всех желающих в местном Discord сервере сразу после контеста для обсуждения задач.

Поздравляем победителей:

Место Участник Задач решено Штраф
1 pekempey 7 305
2 ko_osaga 7 578
3 Lewin 6 216
4 fanache99 6 226
5 natsugiri 6 257

Поздравляем лучших взломщиков:

Место Участник Число взломов
1 halyavin 238:-15
2 Laggy 64:-14
3 MarcosK 59:-9
4 Mistra 8:-1
5 LordVoldebug 7:-1
Было сделано 482 успешных и 684 неудачных взломов.

И, наконец, поздравляем людей, отправивших первое полное решение по задаче:

Задача Участник Штраф
A Dalgerok 0:01
B dorijanlendvaj 0:02
C fanache99 0:10
D bazsi700 0:13
E DAyamaCTF 0:21
F Noam527 0:48
G ko_osaga 0:24

UPD2: Разбор опубликован

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

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

...

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

I always have this question:Why Educational Codeforces Round uses extented ACM ICPC rules? I think the rules of CF regular rounds are very good:-) Thank MikeMirzayanov

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

    I wish if they could make another round type with no pretests .. why is it so wrong that if I submit a solution I will get AC or WA instead of pretest passed and then a short sad story

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

I'm sorry. The last comment was not posted by me. I'm not mean to do it.

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

Good luck to all

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

Hi all! this is my first round here. what should i know about codeforces?

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

An Educational round after a bad contest, awesome.

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

Educational Round is here, Summon halyavin !!

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

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

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

Чет у меня не пошло, жду тестов)

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

How to solve Problem C?

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

    Binary Search on length and check the possibility in O(n) by traversing the string.

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

    Two pointer

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

    Binary search on substring size.

    To check if you can get from a position to other in certain number of moves, the sum of absolute differences between positions in both dimensions has to be not bigger than the numer of moves, and be of the same parity.

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

    I did binary search on the length of the subsegment.

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

I'm so sad that I didn't have a code ready for segment tree beats. This would have been the first time I could use it in a real contest (in problem G) :(

Didn't have time to write it either since It once again took me too long to read other problems after getting stuck in one.

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

    I dont think G needs segment tree beats though it is nice if it can solved that way.

    we can compute lcp array and then for each query we can keep 2*query size ranges and perform something like for how many pairs of a and b will particular range be minimum value (its similar to solving sum of minimum over all segments in an array but instead we have weights to elements here).

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

How to solve E?

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

    In general — digits and masks DP. Calculate the following dynamic programming: dp[pos][mask][f], where pos is the current digit of a number (starting from the greater one), mask is the binary mask of used digits and f equals one if prefix of our current number is the same as in the number n. You can calculate the sum of suitable numbers from 1 to n using this DP. Then the answer is calc(r) - calc(l - 1).

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

      I have a confusion. A prefix can be in the range of 64-bit integer. How can I use this big number as a state?

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

        You don't need to use the number as a state. The position in this number is enough. To do some transactions you need to place the new digit in your number and recalculate DP. Ohh, the most important thing — to calculate the sum of numbers you need to calculate two DPs, one for the count of such numbers (this DP is auxiliary) and DP for the sum of such numbers (to calculate the answer).

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

          Hey, why don't you need to keep track of if you have put something greater than 0, for cases like 000124 and k = 3, because you only turn on the 0-th bit if you had put something greater than zero before?

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

            My solution calculates this DP independently for each length from 1 to |n| and says the sum of numbers of exactly such length. But I thought that I can calculate for all lengths at once because where you places leading zeroes, the count of these numbers will be right. The sum will be right also (because 0 doesn't contributes to the sum at all)

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

              Oh nice, jeje I was calculating all at the same time, that's why mine is different. Thanks.

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

      Sorry, I read that wrong.

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

      I can find number of different integer from [l,r] using digit-dp but how to find sum of these integers?

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

        say calculate for num = 78520193
        iterate from left to right, say you are at position 3 (digit -  > 5) right now, then how many times (say T) does 500000 in your answer?
        it is simply number of ways you can form numbers  <  = 520193 which can found by DigitDP ( you also need to ignore if number of digits used are > k , for which you can use mask --> set the bit for the digit you included ) then this sum would be 500000 * T.
        Now this value if repeated for 78520193, 68520193, 77520193... and so on , since prefix upto position 2 can also change , so for that make another dp table and do the same digitDP for this now.

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

    Probably DIGIT DP, however could not implement it ;(

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

    I always try to make something recursive like answer(A, i) that is filling array A from 17 to 0 and i is the position where we can choose a value. Complexity would be 10^18, but if we make these optimizations complexity drops: If the number cannot be in the range [l,r] return 0; if it will always be in a range [l, r] ask the answer from another dp function.

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

Какой седьмой тест в B?

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

the contest ended ?? it was scheduled to start now, did i miss something ?

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

I am having a hard time with Problem B, Please Help.

My code which works on every other online IDE under 0.01s is getting TLE on case 1 here. I have used GNU's policy based ordered tree in it. used G++ 17 to submit.

Here is my submission -- > 44858365

I tried tweaking things a bit, using int instead of ll. Nothing helped. This thing ruined my already not so good rank, had to rewrite a different solution. :(

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +9 Проголосовать: не нравится
    stk.erase(x);
    st.erase((*x).S);
    x++;
    

    This is undefined behaviour because you are doing something with an iterator that has been erased.

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

      Yes, you are right, I actually figured this out later after I posted here for help.

      Iterating while erasing should not be done this way either, because even x++ is invalid after calling erase. I read it here on SO.

      Thanks anyway!

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

    Use deque data structure , its pretty fast

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

      Yes it is fast indeed.

      Actually this question was pretty easily solvable without any RB tree like i used. I just wanted to try my hands on that special GNU Policy based DS.

      After i failed to do that with gnu_pbds ordered set, i did that question using a simple vector and a map.

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

how to solve D?

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

    The first booth we can't buy must supply the most expensive candies. So we can simulate this procedure. Calculate the current whole price and find the most expensive booth. Then we can compute how much we will spend before we buy the last candy in this booth. Then we subtract the cost and add the quantity.
    Until None of candies can be bought.
    We can use binary indexed trees or segment tree to compute the cost and the quantity.

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

I tried to use two pointer technique for problem C.

Code

However I got a WA. Can somebody please help me in figuring out where I was wrong.

Idea:- Caluclate the position x and y based on the given string. Calculate the diff in x and y based on goal x and y. Now calculate diff between goal x and x and for goal y and y. Now if the diffs in each dimension are not divisible by 2 or the required characters needed are less than given in the string output -1. Otherwise use two pointer to find the shortest string length.

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

    did you check if diff in x is divisible by 2 and y ?

    because if both is you need 2 chars to cancel each others

    for example if you have RUR and x=1 y=0 then it would be RLR

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

    are you failing on test 5 like me(http://codeforces.com/contest/1073/submission/44891148) i also implemented using two pointer kind of thing.

    in test 5 all 'R' are 24 and all 'L are 27 in number and final destination's x coordinate is -59 which is unachievable if we even turn all 'R' to 'L' which will give 51 'L' hence we can at max go to -51 in x direction isn'it test case no 5 is ->

    100 URDLDDLLDDLDDDRRLLRRRLULLRRLUDUUDUULURRRDRRLLDRLLUUDLDRDLDDLDLLLULRURRUUDDLDRULRDRUDDDDDDULRDDRLRDDL -59 -1

    r=24 l=27 d=32 u=17 please comment how it is possible

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

I feel like D was much easier than C. Some people wasted too much time unsuccessfully solving C, while they could solve D instead.

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

    I'm not sure, but I don't think there's a rule that difficulty(C) <= difficulty(D)... |-)

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

    The problems aren't always sorted by difficulty in educational rounds, I think.

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

    I figured out C easily and implemented it within 20 min, I had 1.1hrs to do D, but couldn't. :(

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

Dear anyone please try to hack my solution for D 44864411 Thanks :D

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

How to solve C ?

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

    Binary Search for the answer. To check whether you can have a subsegment of length x as the answer iterate over all the subarrays of length x and then all you have to check is whether the difference between the expected position and the actual position is greater than the subarray length or not and also if the difference is less than the subarray length we need to check the parity of the difference between the 2 values.

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

in problem C, when I realized that I used binary search in wrong way, and it took a lot of time to correct my solution but too late. Im now feel a little regret about it, hmm. Hope these experiences will help me grow up in the future. Hope you guys have good rating after the contest <3<3<3

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

    can someone tell me why I get so much dislike, i dont think that my comment is annoying people like this. and I also wonder why my contribution is a negative number (-4). why this happened to me, plz help me, (T-T)

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

can anyone give me a single reason why this solution give tle https://codeforces.com/contest/1073/submission/44874378 and when i change compiler to c++11 it give acc + almost all my friend list got acc with the same code and without fast input and this is my code acc https://codeforces.com/contest/1073/submission/44877617

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

Правильно ли использовать два указателя в задаче С? Решение прошло претесты.

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

How do you solve D? I thought of using 2 BITs, however the number of submissions indicates an alternate easier solution.

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

    On each iteration you have some money and sum of remaining candies. Just buy as much of every candy as you can and then, when your remaining money will be less than sum of every candy left, just try to buy them one by one in O(n). Also maintain sorted candies to check if remaining T is enough to buy highest costing candy. If not no need for them and just skip until you have one that is less. During that decrease sum of all candies left.

    Apparently T's decrease is logarithmic so you end up with O(n log(n)). There are possibilities to improve performance in many ways, but none of them are needed to pass the tests, sadly (I did some and now regretting the lost time in implementation).

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

    I solved it with just 1 BIT. You try to buy 1 candy for every booth, if you can't, then you can binary search the position where sum of 1...i becomes greater than T, and you erase it from the bit (you update position i, with -value[i]) and keep doing that until you can buy 1 candy for all remaining booths. At the end, you had to do N Binary search which is O(N*ogN*logN) or O(N*LogN) if you use the trick of binary search on BIT. My submission

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

      Yep, I had a similar idea! How did you keep track of the count of valid booths since you're erasing them from the BIT?

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

        oh, you can use a variable, initially, you have remaining = N, every time you erase one, you do remaining--

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

      or O(N*logN) if you use the trick of binary search on BIT

      Could you please explain or give some resource about this trick ?

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

      Why, you set  - value[i] to i instead of 0? Don't we need to neutralize/erase it?

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

        Yes but remember when I first inserted the value I added value[i] so now I need to subtract that. Remember that BIT is sum of all values lower than i . If you update with 0 you are not doing anything.

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

Can someone please tell me how this O(n) solution TLEd on B? http://codeforces.com/contest/1073/submission/44854424

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

    Your forgot to use your fastread: 44876642

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

      Yeah, that's how I got it to pass. But the input size is not that large. I usually don't fastread for this array size and have never faced this problem before. I guess I've learned my lesson about that!

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

        "Input size is not that large", input parsing has the same time complexity as the solution itself (both O(n)), so (percentually speaking) it can't really get much "larger" than that.

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

    Maybe 'endl' (with flush?) issue? Try to change to "\n" (or '\n'). Reading 4e5 data, maybe use yours 'fastread'?

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

i can't hack with Generator and i get invalid input can you help me

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

    There can be two reasons for invalid input. 1. Make sure you have newline character at the end of the generator output. 2. Make sure the last integer or character or whatever variable of generator output is followed by new line character instead of a space i.e. run loop for n-1 numbers and print last number followed by new line character instead of space followed by newline character

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

Can anyone explain C in detail. What are we exactly doing after applying binary search on the length of a substring?

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

    In C, we can see that if we do change a substring of size k, then it doesn't matter if we change 1 or k elements in the substring. An easier approach would be to change all of them.

    Let's say that we're at (x, y) and we have to go to (a, b). The shortest way between the two points is the Manhattan distance between them. However, if your k is greater than this Manhattan distance, you might want to 'waste' some moves before you reach there. It is easy to see that the number of moves you 'waste' will always be even.

    So, if we do have to change this k subsegment, we can do it only if we can travel the Manhattan distance, and waste some moves if any. More formally, you get k >  = dist((a, b) , (x, y)) and (k)mod2 = (dist)mod2.

    Another observation is that if you get a valid subsegment of size k, you can get it for k + 2 as well. However, we don't know about k - 2.

    So, we would binary search over all the even sizes and odd sizes of k separately and pick the minimum. We can binary search as the function of whether k works or not is monotonic. Or in other words, it's of the form NN...NYY..Y.

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

      can you please elaborate why binary search works here. i didn't get the last part.

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

        The reason we can apply binary search on a sorted array is because of the property that if i > j =  > A[i] >  = A[j]. So, if we are searching for an element k, and it's lesser than the present index, it implies that it would be lesser than all the indices on the right, so we don't need to check there.

        Similarly here, we can observe a similar property, which is that if we can find a suitable segment of size k, we can find it for all k + 2 * c, where c >  = 0. Thus, we could check for a potential minimum on the left. This is because the number of moves we 'waste', will always be even.

        On the other hand, if k it not suitable, it means that all k - 2 * c for all k / 2 >  = c >  = 0 will not be suitable, and thus we need to check on the right.

        You could have a look at the Topcoder tutorial here for a better explanation.

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

Can someone explain it to me why the solution for E got WA on 7? My solution for E I know my solution will calculate wrongly in some big cases but I don't know why.I take mod everywhere. Sorry for my poor english. :)

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

Can any moderators look into this case? Thanks!

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

What are the hack cases on C?

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

What does this error mean?

How to correct the error?


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

    After successfully generating the test data, print out one last endline character.

    (This one is not required in manual hacking, yet mandatory for generator-based ones).

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

A very very nice observation in D of why brute force would pass: The outer loop won't execute more than log(t) times because after each loop, t becomes t%i where i is some number <= t and if i<=t, t%i can take values from 0 to t/2 (proof is easy :) )

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

Can anyone explain why this gave TLE for problem D: https://codeforces.com/contest/1073/submission/44873511

The complexity according to me is O(n * (log n)^2) which should have passed. Is it because of inefficient code?

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

What's special in test case 8 for F problem.Getting "Sum of paths in jury is larger than participant".Isn't it just the two farthest nodes from the respective 2 end nodes of the common vertices path?

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

How to solve F?

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

I'm very sorry of what I've said

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

Editorial?

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

Why is E easier than D and D is easier than C -_-

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

Can any one provide me with nice digit on dp blogs?

Thanks in advance

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

Why E Wa on test8? I'm very confused.

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

Is the editorials published?

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

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

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

The solution of problem F is: use greedy thoughts to find the longest path in the tree. So, we will look for the first point of the common part as root, then dfs () from that root to find the other end

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

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

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

Can anybody describe the solution of the problem G (Yet another LCP problem)?

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

Has editorials been published? If not, can anyone provide me solution to Problem D.