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

Привет, Codeforces!

В 30.07.2021 17:35 (Московское время) состоится Educational Codeforces Round 112 (Rated for Div. 2).

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

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

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

Задачи вместе со мной придумывали и готовили Адилбек adedalic Далабаев, Владимир vovuh Петров, Иван BledDest Андросов и Максим Neon Мещеряков. Также большое спасибо Михаилу MikeMirzayanov Мирзаянову за системы Polygon и Codeforces.

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

Также от наших друзей и партнёров из Harbour.Space есть сообщение для вас:

Codeforces and Harbour.Space

Привет, Codeforces!

Прошла неделя с тех пор, как завершился Harbour.Space Scholarship Contest. Это был интересный опыт! Мы рады поделиться результатами раунда и выразить признательность каждому участнику.

Еще раз хотим поблагодарить авторов и координатора раунда, благодаря которым этот контест состоялся в кратчайшие сроки:

Спасибо за вашу усердную работу.

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

1-3 место: Ali.Kh, Yousef_Salama, sorry12000

4-10 место: sunyx, amanbol, IMRED, Meijer, loan, kpw29, Huah2

11-15 место: dhruvsomani, adamant, Kaitokid, RetiredPlayer, c8kbf

Мы рады сообщить, что рассмотрели заявки всех победителей и скоро примем окончательное решение о дополнительных стипендиях. Следите за обновлениями и своим почтовым ящиком!

Помните, чтобы претендовать на стипендию, вы должны ответить на письмо отправленное 3-4 дня назад. И чтобы убедиться, что адреса электронной почты не были написаны с ошибками, мы хотим воспользоваться этой возможностью и попросить Yousef_Salama, Huah2, adamant, c8kbf, Naseem17 связаться с нами по электронной почте (almaz.aubakirov@harbour.space) или написав сообщение Harbour.Space.

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

Место Участник Задач решено Штраф
1 SSRS_ 6 92
2 tourist 6 120
3 WZYYN 6 127
4 Sugar_fan 6 131
5 Tlatoani 6 140

Было сделано 57 успешных и 612 неудачных взломов.

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

Задача Участник Штраф
A Geothermal 0:01
B tourist 0:03
C kaiboy 0:04
D dario2994 0:07
E tourist 0:11
F rainboy 0:30

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

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

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

i hope i can get top 10 in this contest

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

I hope that this contest will be as good as CF Round #735. And maybe even better

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

Hope this educational round actually have balanced problems unlike the last edu round

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

Please don't start hopeforces again

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

28/07 -> July Cook-Off 2021

29/07 -> Codeforces Round #735

30/07 -> Educational Codeforces Round 112

31/07 -> July Lunchtime 2021

31/07 -> AtCoder Beginner Contest 212

01/08 -> Leetcode Weekly Contest 252

01/08 -> Codeforces Round 736

Raining Contests

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

I hope I can break my unconditional love with FSTs in this round.

:(

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

Please get me out of this losing streak. I'm doubling in rating loss each time.

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

y would anyone waste their time going to some trash unaccredited university, beyond me tbh

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

Good luck, guys!

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

I hope, I won't become turquoise again ^^

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

Good luck to everyone!

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

My first Contest as Expert , will try my best today to move up more !!

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

Hopefully this contest won't make you worry about your setters' safety.

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

I hope I can solve B XD

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

It's time to move up.
Good luck for everyone

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

Hope that there won't be any Bitwise-operators tonight.

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

I hope I will solve B in this contest

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

MikeMirzayanov I think something is wrong with my registration. It shows me as a official participant. Can you please fix it? I don't want to lose master.

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

Maybe there's sth wrong with Problem D.

How can a string which length is 1 can be changed to an "beautiful" string ?

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

just realized why A is the hardest problem ..

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

The announcement which came for C, should have come early. I was solving a different C, where Alice is looking for the maximum and then Bob goes with the minimum afterward.

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

Solved D at 01:50, so happy! ^__^

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

After giving yesterday's contest. This one feels so much better. Regained some confidence again. :)

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

When you solve A,C, and D but not B. Sigh...

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

B had more cases than law courts!

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

In my opinion, C was much easier than A and B. Thanks.

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

I think A,B is way more harder than C,D and E lol

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

I took 47 minutes to solve problem B (+ penalty), but 9 minutes to solve problem C and 15 minutes to solve problem D....

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

I'm so disappointed of myself Idk why my B solution is wrong :( :( I solved C easily I could have read D but I kept saying I will solve this B

Submission

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

Mathforces. 4 wrong submissions for A :(

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

score distribution is same for all problems? i have solve only C and D today but ranking is same who slove only A and B.

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

Nice contest, E is a very interesting problem.

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

Why was A and B (didn't read rest) so "heavily" math based compared to other general As and Bs? I'm surprised so many people got A, toughest A and B I've ever seen, also first time seeing both the starting two problems are math.. which is surprising considering most of the people can only do A and B (I'd expect something which has to more with programming than complete maths). IMO

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

    Well, you can't have every A be "you have an array and you need to permutate through it and do and do x". Sometimes there has to be math involved, and let's be honest, it wasn't a lot.

    And "toughest A and B I've seen" seems comical when yesterday there was a B rated 1700.

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

    If this is your "toughest A and B", then 1. You haven't done many contests in CF. 2. You don't really know what is a tough problem and what is not.

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

Unfair constraints for python in problem D

same code for c++ https://mirror.codeforces.com/contest/1555/submission/124343239 got accepted but

python code got tle https://mirror.codeforces.com/contest/1555/submission/124338639

Headquarters MikeMirzayanov, Round Coordinator BledDest, one of the authors Errichto

please look into this.

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

    1) We are not creators of Python. Go complain to them. I think that CF staff only cares about easy problems being solvable in slow languages.
    2) I have nothing to do with this problem. I was mentioned in the blog as an author of the previous round -_-

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

    even though I am a newbie here in code forces or should I say in this whole cp genre .but i know that [1] you must not tag Authors and other GM unnecessarily in (unless you'r LGM YOURSELF). [2] you must wait for editorials to come out before asking too much question [3] be respectful. Nobody here's the homeroom teacher

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

    Wow. So many downvotes for no reason. I raised a valid concern for god's sake.

    The problem https://mirror.codeforces.com/contest/1553/problem/B. works in 500*3 (about 10**8) complexity , but my solution in today's contest has time complexity of (12*10^5 + 2*10^5) in worst case and i still got TLE.

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

      It's not a new issue. Many times python and java solutions get TLE due to strict time limit(Ask secondThread lol). Nothing can be done after contest.

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

      """Each participant has the right to choose the language that he likes. Together with all its pros and cons. Yes, Java runs a little slower on average, but it has better static analysis in the IDE. It is quite typical for IT tasks that the tool is chosen for the task. And yes, I'm sure it's not a bad thing that sometimes you encounter purely programming difficulties. Understanding that not all ways to read or write data are the same is helpful. In particular, it is important to understand the basics of buffering. Specifically, in your case, knowing the standard library of the language in which you write is also useful. You are using Arrays.sort, but not reading the documentation. Read it finally.""""
      - MikeMirzayanov, March 2021

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

    Use pypy with some fast io (fast io is an issue even in c++ so it's kind of fair).

    Your code ACs in 732ms: https://mirror.codeforces.com/contest/1555/submission/124358306

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +5 Проголосовать: не нравится
    1. You have a choice of languages, Python is known to be slow, and Codeforces make it very clear that the time limits are the same for all languages. I normally choose to use Python, for ease of writing, in spite of this, but I know that its performance, even using PyPy, can be a problem.
    2. When you select the standard Python interpreter (cPython) as your submission language Codeforces tell that PyPy is normally faster
    3. I am not sure why your code is slow, but my Python code for this problem runs well within the time constraints using either Python or PyPy3. See my contest submission using PyPy3 and the same code run with Python 3
»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

a lot of case works in B :/

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

What the heck is wrong with guy who set up problem B. Like you really want the people to stop logical coding using their thinking skills and just spend 15 minutes considering all the cases like a donkey, and spend another 30 debugging when they get a penalty on the same code. Is this the way the best coding platform wants to evaluate its participants? If yes, then good luck/bye caseforces!

PS : i think the problem setters just wanted to minimize the nuumber of people who could attempt the good questions afterwards by just sticking them to this **** problem!

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

    Nevertheless, I did not like problem B either. It was just implementation, no thinking.

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

      Basically, you can just try moving it along only x-axis or only y-axis. There is no need to move it in both axes.

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

Problem F:

I used HLD to solve it. Can somebody please tell does there exists any approach without HLD?

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

    Did you use HLD to find usable edges? I'm not sure but I think the problem boils down to single usage of an edge in the tree formed from all the queries and if that's the case, we can split the tree about an edge that can't be used anymore, and re-root the smaller component with another parent? Just like small to large merging. PS : We can keep splitting a tree into forests by this process.

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

      Initially, I made a tree by using only edges which are first time connecting any two different components, then observed that any cycle can span atmost one edge of the tree. After that, used HLD for max path queries. So after that anytime got validation for adding any edge just set all values of all edges to infinite (basically deleted). To check validation, just did a max path query.

      Can you please tell in your approach after splitting into forest how are you checking for any query.

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

        Yes I was thinking of the exact same thing. But just to confirm, please tell me if this is right. First off anytime a tree edge arrives we can add it. Otherwise I found a sum for each node in the tree that denotes the xor of the path from the root to that node. If 2 nodes are in the same tree in the current forest of trees and have xor of Node sums = (edge ^ 1), then they can be connected. Otherwise they cannot be connected. Now if they can be connected, we can disconnect each edge on the path between them using the process i described before and recalculating the sums and root Node for each Node in the smaller component.

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

        dnshgyl21 I think your implementation does not consider the fact that it will be a HLD forest, you always start from root 0.

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

    Model solution is without HLD. We'll describe it in editorial, but shortly, we first find the MST of the graph (using the time when the edges are added as weights, to find the edges that are definitely present in the answer), then create a logarithmic data structure like Fenwick or Segment Tree to mark the edges belonging to a cycle and/or verifying that the cycle we're adding doesn't intersect with some previously created ones.

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

      Can you please describe how can we mark edges on any path in a tree using Segment or Fenwick tree?

      Upd : Thanks,i got it now.

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

        There is a way to range addition on the path from $$$v$$$ to $$$root$$$ and range sum on path from $$$v$$$ to $$$root$$$ using two Segment Trees, but it's not needed here.

        Since each edge will be marked at most once, you can mark edges one by one while asking a sum on path: all using Fenwick tree on Euler tour.

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

could someone tell me whether i am wrong with these i have tried my own these problem link

void solve(vector<int>v[],int src,vector<int>&euler,unordered_map<int,int>&mp,int &counter) {
    euler.pb(src);
    if(mp.find(src) == mp.end()) mp[src] = counter;
    for(auto i:v[src]) {
        counter++;

        solve(v,i,euler,mp,counter);
        counter++;
        euler.push_back(src);
    }
}

void storeminimum(vector<int>&euler,int sq,vector<int>&sqrtd) {
    for(int i=0;i<euler.size();i++) {
        sqrtd[i/sq] = min(sqrtd[i/sq],euler[i]);
    }
}

void Main() {
    int t;
    cin>>t;
    for(int kk=1;kk<=t;kk++) {
        int n;
        cin>>n;
        vector<int>v[n+1];
        for(int i=1;i<=n;i++) {
            int m;
            cin>>m;

            for(int j=0;j<m;j++) {
                int a;
                cin>>a;
                v[i].pb(a);
            }
        }
        // first occurance 
        unordered_map<int,int>foc;


        // store euler path 
        vector<int>euler;
        int count = 0;

        solve(v,1,euler,foc,count);
        int sq = ceil(sqrt(euler.size()));
        vector<int>sqrtd(sq,INT_MAX);
        storeminimum(euler,sq,sqrtd);
        int q;
        cin>>q;
        cout<<"Case "<<kk<<":"<<endl;
        while(q--) {
            int a,b;
            cin>>a>>b;
            int ans = INT_MAX;
            int l=foc[a],r=foc[b];
            while(l<=r) {
                if(l%sq ==0 and l+sq-1<=r) {
                    ans=min(ans,sqrtd[l/sq]);
                    l+=sq;
                } else {
                    ans = min(ans,euler[l]);
                    l++;
                }
            }
            cout<<ans<<endl;
        }
    }
    
}

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

Are you kidding me? I used old version of problem F statement where cycle was simple if there weren't any repeated edges. And this is the only reason why I didn't get accepted during the contest. I've got accepted in 2 minutes after the round ended, so sad(

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

Can somebody please explain the solution of problem A?

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

    What I did was, write down N as N = 6a + 8b + 10c. Now this can be written as N = 2 * ( 3a + 4b + 5c ). Now let's take ( a + b + c = S ) , so we equation becomes N = 2 * ( 3 * S + b + c ), and b + c = S — a. So this becomes N = 2 * ( 4 * S — a ). Now just find a and S( and one thing if N is odd take N as N + 1, don't know the reason for this but it just worked for odd numbers because they are not divisble by 2 ).

    Now the total time required is TIME = 15a + 20b + 25c. TIME = 5*( 4 * S — a ). This is the answer.

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

    if(n<=6) we need only 1 small pizza giving ans as 15 mins Consider x small , y medium and z large pizzas : so number of slices will be n = 6x + 8y + 10z corresponding to it , time spent = 15x + 20y + 25z = 5*n/2 ( in terms of 1st equation) for odd number of slices , u can find that ans modifies to 5*(n+1)/2

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

    I listed out the first 20 values of n:

    1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19 20 21
    15,15,15,15,15,15,20,20,25,25,30,30,35,35,40,40,45,45,50,50,55
    

    and noticed that increases by 5 every 2

    out.println(Math.max(15, ((n + 1) / 2) * 5));
    
  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится +1 Проголосовать: не нравится

    If $$$n \lt =6$$$, print $$$15$$$

    For $$$n \gt 6$$$, if $$$n$$$ is even, print $$$n*2.5$$$

    else print $$$(n+1)*2.5$$$

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

Expected to become an expert today, will probably end up as a pupil...
Spent both the hours on Problem A and got 7 WAs, lol.

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

    Almost did the same, then decided, 'hey, why not check other problems'.

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

      Can't argue with that, though I spent around an hour trying to figure out why exactly was even a brute-force solution giving me WA (Brute Force on n % 120, 120 being the LCM)...
      And I still don't know what exactly is wrong with my code...
      Edit:
      I finally realized that considering n / 120 and n % 120 separately doesn't always give the optimal answer.
      Eg: 121: My output would be 315, while the optimal answer is clearly 305.
      My program would waste 5 slices of pizza, while the optimal answer would only waste one.

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

    If you saw the sample cases, you would've noticed the answer always being ((n+1) * 5) / 2 for n >= 6. Something to do with the fact that 15/6 = 20/8 = 25/10 = 5/2.

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

      Yeah, I guess the McNugget theorem can be applied to this problem as well.
      The McNugget Theorem
      6 = 2 * 3, and 8 = 2 * 4.
      3 and 4 are relatively prime, so the greatest number which cannot be formed by them is 3*4 — 3 — 4 = 5 (10, because of *2; 10 exists as the third term here, so it too is covered).
      Because we only need to consider even numbers (odd numbers can be converted to even), and we are working with *2 here, all the even terms above 6 will be covered.
      Numbers below and equal to 6 can be processed as a special case.

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

Solved 4 but still feeling worthless because of A and B xD

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

I spent 40 minutes on A and didn't have enough time to solve E :(

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

B ruined my entire contest. Couldn't even read E though it was pretty doable. :((

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

124312667 this is my submission for problem B during the contest where i took the values float instead of long long and it gave WA. It gave a difference of 2 in one of the TC. 124345470 this is that same approach(everything same just changed float to long long) but got accepted....can any one pls explain why this happened. edit: by mistake initially i gave the link to wrong problem.

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

Can we do C using dfs ? I think it is the same as Cherry pickup II of leetcode ? please help.

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

But its a question afterall with a valid difficulty range for qstn. B. Also,its my fault that i assumed it to be something else. It actually didn't have much case work. Apologies..

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

Was thinking I'll regain Expert! But problem B exists lol, ate up huge amount of time :(

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

A clean(ish) solution for B.

Spoiler

We need to check for the number of free cells possible in both X and Y directions. (Free cells are the cells not occupied by the first table). If the number of free cells in ANY direction (X or Y) is greater than the number of cells needed for second table, then we can fit the second table in. The first table only needs to move horizontally or vertically to acommodate the second table, it will never have to move diagonally.

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

Is the rating predictor broken?

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

In reference to problem B 3 actions can be taken: 1. Rename the website to caseforces 2. Ban the guy who set it up from setting up future contests 3. The guy should have some self respect and delete his account

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

Should we be sad or happy in this case? :(

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

One of the best contests I have participated at in my life. Beautiful, Balanced and the Best

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

Actually problem B should be C and C should be B!

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

I admit I struggled at A took 30+ mins. I know it was quite easy but still.

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

hard contest only the first problem was easy

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

4 Div2 (with 2 Div1) Round, 2 Div3 Round, 2 Educational Round, 2 Div(1+2) Round, and 1 Global Round, Total of 11 Rounds held in this Month. So we can say July is the perfect month for all the contestants who like and enjoy every round of Codeforces. Thanks to Mike Mirzayanov and all the problem setters of this month <3

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

wonder how many guys copy-pasted their segment_tree for E from the Internet

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

A solution video for the first four questions of div 2

https://www.youtube.com/watch?v=NMSQ-uu59mQ

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

why to even use double in problem B as shown in sample output.

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

I misread problem D and thought that input string can contain any 26 letters of Latin alphabet and it is allowed to change any character of the string to one of the first 3 letters and couldn't solve that problem. Can this problem be solved?

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

»
5 лет назад, скрыть # |
Rev. 5  
Проголосовать: нравится +5 Проголосовать: не нравится
The solution to Problem A with Proof:
»
5 лет назад, скрыть # |
 
Проголосовать: нравится -9 Проголосовать: не нравится

Nice round with not easy nor really hard tasks E is especially good!

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

Is anybody know which testcase is in task b test 2 case 554? My solve fails on it and idk why... Here is link on it https://mirror.codeforces.com/contest/1555/submission/124358523 [](https://mirror.codeforces.com/contest/1555/submission/124358523) plz say what is wrong...

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

Where's the editorial?

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

Questions about Karry5307_AK_NOI2026 again:

  1. How could he solve B in 29 seconds at 00:09:43 after he solved C at 00:09:19?
  2. How could he solve F in only 3 minutes after he solved E at 00:51? You see, SSRS_ solved it in 21 minutes, tourist solved it in 42 minutes, and WZYYN solved it in 25 minutes. These three are all LGM but they solved F in at least 20 minutes. How could this guy solved it for only 3 minutes?

I think there must be something strange.

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

Can we do C using dfs ? I think it is the same as Cherry pickup II of leetcode ? please help.

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

Can anyone help me with problem B solution?? What I am doing wrong here? It is failing 2nd test. Here is the verdict: wrong answer 530th numbers differ - expected: '0.0000000', found: '1.0000000', error = '1.0000000'

here is code:

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{

    int tc;
    cin >> tc;
    while (tc--)
    {
        ll W, H, x1, y1, x2, y2, w, h;
        cin >> W >> H;
        cin >> x1 >> y1 >> x2 >> y2;
        cin >> w >> h;
        ll ans = 0;

        if ((h + (y2 - y1)) > H && (w + (x2 - x1)) > W)
            cout << -1 << "\n";
        else if ((w + (x2 - x1)) > W)
        {
            //work vertically
            //cout<<"h="<<h<<" (H-y2)="<<H-y2<<" (H-y1)="<<H-y1<<" ";
            if ((H - y2) < h && y1 < h)
            {
                ans = h - y1;
                ans = min(ans, y2 - (H - h));
            }
            cout << ans << "\n";
        }
        else
        {
            //work horizonatally
            if (x1 < w && (W - w) < x2)
            {
                ans = w - x1;
                ans = min(ans, x2 - (W - w));
            }
            cout << ans << "\n";
        }
    }
}
»
5 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

Have the solutions been rejudged yet? When will the ratings change?

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

Interesting Round, thanks!

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

Can we just appreciate that there is no pretest for D where m < n, so I got RTE. Nice.

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

what's the binary search solution for E? I am more interested in how to write the predicate function in o(logn) or so ?

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

MikeMirzayanov My submissions of this round skipped getting an unexpected warning that my submission to the problem C 124303153 coincides with the submission 124301236 by NZB. This is totally unexpected. The solution to problem C is super simple. I request you to manually check the submissions and the solution to problem C. I'm totally disappointed with this kind of wrong warnings from such a reputed platform like codeforces. Because this is the second time I have been convicted without doing any kind of violations. I wrote a detailed blog on this after getting my first warning but nothing changed. Please read the blog Unexpected warnings from CodeForces. Hope you will look into the matter. Thanks.

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

    MikeMirzayanov same thing happened with me for Question C. The problem was a very simple one.Please look into this

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

    The idea and code of problem C are really quite simple. So, the chances of having similarities in codes are high. Even, my submission's main function has a lot of similarities with you: 124324875. It's quite unfortunate and saddening to see such false-positive cases. I hope, MikeMirzayanov will look into this matter and sort out this thing.

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

    MikeMirzayanov This same thing happened to me too... I received an unexpected message from System saying that my submission was similar to some 10+ other submissions for this problem? This was purely coincidental at least on my end, since the problem's solution was so short.

    Here is mine: 124296686.

    Also my submission ID was earlier than every other submission mine was considered similar to, so there's no way I could've copied/cheated from any of these people.

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

Someone, please explain the first test case of question 5

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

Did anyone who solved F use lca,dsu & merge small into large?

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

When I tried solving problem B using long double for output, I was getting WA on Test 3. But when I used long long instead of long double in the same solution, it got accepted. Why? Can someone please explain?

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

One constructive feedback : It would be really nice if educational rounds had atleast one problem with a high upsolve value for Div2 contestants, i.e. problem that is slightly out of reach for majority of Blue/Purple contestants.

In this contest, E is a very standard lazy segtree problem and F is (seems ?) too hard.

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

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

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

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