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

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

Привет всем!

Я рад пригласить всех к участию в онлайн зеркале Балтийской олимпиады по информатике в 22.07.2020 14:05 (Московское время) и 23.07.2020 14:05 (Московское время) на Codeforces!

Балтийская олимпиада по информатике 2020 (BOI 2020) – индивидуальное соревнование для учеников средней школы из одиннадцати стран (в алфавитном порядке): Германия, Дания, Исландия, Латвия, Литва, Норвегия, Польша, Украина, Финляндия, Швеция и Эстония. Более 60 участников борются между собой, решая сложные алгоритмические задачи. Каждая страна представлена 6 лучшими участниками по итогам национальных олимпиад. Официальную страницу олимпиады можно посмотреть на boi2020.lv.

Контест состоит из двух дней, каждый день участникам дано 5 часов на решение 3 задач различной сложности. За каждую задачу можно получить до 100 баллов, которые распределены по нескольким подзадачам с различными ограничениями, что позволяет участникам получить частичные баллы. Оценивание происходит по формату IOI, где участник получает полный отчёт по тестированию по всем тестам во время соревнования.

В этом году олимпиада должна была состояться в Латвии в Вентспилсе, однако не проводится на месте из-за пандемии, поэтому ученики будут участвовать онлайн, под присмотром участников жюри из каждой страны. Благодаря помощи MikeMirzayanov, мы рады провести онлайн зеркало на Codeforces для всех желающих.

Обратите внимание, что соревнование не рейтинговое. Зеркало начинается на 1 день, 1 час и 5 минут позже официального контеста.

Желаем интересного контеста! :)

-- BOI 2020 committee

Мартиньш Опманис, Рихардc Опманис, Сергей Мельник, andreyv, Pakalns, gen, eduardische, Alex_2oo8, nvilcins, KarlisS.

UPD1: Таблица результатов не будет публичной, каждый участник сможет видеть только результаты своих посылок.

UPD2: Разбор задач 1-ого дня опубликован.

UPD3: Разбор задач 2-ого дня опубликован.

UPD4: Поздравляем победителей с полным результатом 600 баллов WZYYN, isaf27, Arpa!

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

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

Wow!!! I was looking for a way to participate from country that's not mentioned above and thanks to MikeMirzayanov

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

Looking forward to great problems :)

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

It's pitty that is not rated. I remember similar rated mirrors on CSacademy for Balkan OI.

Thanks for contest, I hope to see more initiatives like this in future (maybe some national olympiads).

I know we are getting many such rounds from past as Opencup, but still there is a lot of unused materials.

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

Whats the expected difficulty ? More inclined towards Div1 I guess ?

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

    Yes, solving the full tasks is likely in the Div1 difficulty range but that does not mean that you can't enjoy the problems. The problems are split into subtasks and the easier subtasks can be closer to Div2 problems in difficulty. You can also check out problems from previous BOIs if you are trying to decide whether to participate or not.

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

Link to participate ?

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

The standing should be hidden in the contest time following rules of IOI standard contest.

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

'the students will compete in a proctored setting online' Can you share more details of this?

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

    Hi, it is requirement only for the official participants, if you participate in the mirror, you don't have to worry about it.

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

      I was just asking out of curiosity

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

        There are people monitoring the participation of the students in each of the countries. I think the team from each country gets together at some place and there are persons watching over them.

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

          Are these "persons who watching over them" from the same country or representatives from an International Committee? I understand that the latter is more unlikely with the current pandemic situation but i'm curious. By the way is this how the IOI going to happen?

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

            BOI will not be a good representative for how IOI will be proctored I’m afraid.

            Regarding IOI, Singapore has started to distribute drafts of proposed proctoring requirements to the delegations. I believe these weren’t released to public because it’s still work in progress and large parts of it would only affect delegations themselves rather than students.

            Having said that, let me ask the hosts if they are willing to provide some sort of short summary for how IOI is planned to run to the students & general public.

            UPD: I have checked and more information is expected to be released to public in early August.

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

hope to be more oi contest in codeforces

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

а условия будут доступны на русском языке?

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

If we code different subtasks in different submissions will we get points for both?
This is followed in IOI but not sure if this works on cf since this didn't work when I did vc of ceoi 19 on cf

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

    The submission with highest score counts. You can try to combine "subtask-specific" code for multiple subtasks in one solution, but if you don't you gain points equal to your best submission anyways. These are the rules of the official contest, I'm not sure if cf will mirror them entirely.

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

Hey guys , I wanted to ask something. I do have nvedia graphics card on my computer but when I perform a simple compiling and running test on sublime, it takes from anywhere between 10 to 15 seconds to execute. So is my laptop slow or is it that it is not using card for computation? Any suggestions?

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

Why is this contest unrated? Let people have some fun, no need to make it unrated

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

In problem C, the 3rd subtask should be passable with a (n + m) * logm algorithm right? Well, at least for java, the constraints seem to be too tight. I think the problem lies in the fact, that in Codeforces Java programs use quite a bit of time not related to the running time complexity (like printing just one line takes few 100ms more on java than on C++).

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

how to solve A ?

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

    My approach to A goes like this, first initialize ans = n, now answer would be the smallest number between 1 and n-1, which returns 1. Now let's set a cursor named cur. Which starts in some position (let's name it x). Now we will do a binary search on [1,n-1]. If in the ith step, we do cur = cur+mid, then in the next step we will do cur = cur-mid and vice-versa. This will surely lead us to the answer. Now the fact comes, what if cur cross the bound! So we need to choose the position x cleverly. It's not hard to understand the fact that the bigger the value of C is, the bigger the moves are. So the worst case is C=N. Now we can simulate this case with a binary search to choose the position x for cur. The interesting fact about this approach is mid becomes too large or too small to intersect with previous queries! I hope this clears the doubt!

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

How to solve A,C? Also is B just checking that the triangle contains the origin?

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

In B my solution passes 2,3,4,5 subtasks but it fails on first subtask. Anyone has the same problem? Or anyone has any idea how this happened?

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

Will there be upsolving?

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

Excellent contest. I enjoyed it a lot, although I couldn't AC any problem. When editorial will be published?

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

It would be helpful if anyone shares there approaches for the problems.

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

did anyone solve subtask 3 of the third problem with binary search?

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

My (n + m)log(m) solution for the third subtask of the third problem didn't pass, I think the constraints were too tight or maybe it's just a codeforces problem (taking more starting time for Java).

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

I am totally stuck and clueless on how should I go next on Joker. Can anyone please give me a hint? Here is what I found so far :

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

    I know a solution with $$$O(N*\sqrt{Q}*\alpha(N))$$$ which uses dynamic dsu + mo's algorithm. I don't think it will pass the TL though.

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

    If you have link cut tree template, then it can be solved quite easily: Go forward keep only important edges. Then go backward, remove those edges one by one, also maintain a pointer at the end. Try to add edges from the end that won't produce an odd cycle, possible remove some edges that can be removed when going backward.

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

    You were on the right track. This problem can be solved in $$$\mathcal{O}(M \log(M) \log (N))$$$ with Divide and Conquer + DSU with rollbacks. Keeping the intervals as $$$[1, l_i) \cup (r_i, M)$$$ is more convenient, as it avoid the issue where edges that were added on the right and are removed on the left.

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

What is the problem with the my python submission 87694579, I am sure I solved the test cases 1(the example given), but it gives me 0 point. I think the problem is with the input and output?

I tried to see other python (both python 3 and pypy 3.6) submission, but there is no one who has got totally accepted.

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

Boi!

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

Will this contest be available for virtual participation?

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

When will it be possible to see others submission?

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

Please make standings or submissions visible today , it helps to get to know which problem to solve first , and standing keeps motivated to not give up.

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

How to solve day 2 problem A?

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

    Well, not exactly. In the problem you linked we are forced to use pairs (I at least found it non-trivial to prove we'll always want to swap pairs only, except for the last vertex).

    Also here you need to reconstruct the solution which is also not exactly trivial (but not very hard either).

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

B2 is the same as tree and hamiltonian path atcoder

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

Anyone ideas about C from day 2? I had zero ideas except some very, very ugly DP which would have solved a few subtasks...

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

Thank you gen. What wonderful contests they were! I really enjoyed it.

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

I had to.

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

    Let's pretend everyone was protesting in unity against geometry ;)

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

    Well, now that you've started it, I'll share a video I made yesterday as a joke. Hopefully, I won't offend anyone.

    On a more serious note, I think that perhaps it wasn't an ideal task for subtask-structure. What I mean by that is I think it was way harder than usual to score points even on the first subtask (it's reasonable if you notice simplification to 2D, but if you keep working in 3D, good luck). Additionally, long testing queue during the first onsite day, made it a bit more difficult as well. Finally, pre-written code may have helped a lot in this task as well, so comparing onsite results to online mirror isn't exactly fair in my opinion either. So, while this is definitely an amusing situation, it was the hardest task in the set in my opinion, and I'm not overly surprised, especially since I feel that a lot of people kept working on other tasks as well instead. Which maybe, given the difficulty to score even some points here, was in most cases absolutely the right decision.

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

    This diff would've yielded me 43p. Not even geometry, just a stupid bookkeeping error :P And since it uses floats, I got 100p in analysis after a little tweaking.

    Not necessarily blaming the queue though, I got this done at the very end.

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

      The main idea of my solution was to pick an arbitrary vector and split everything else into two parts (by sign of triple product). After that, I maintained two sets with vectors by polar angle. (Again, used triple product sign for custom comparator)

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

I dont know why I am getting WA on test 38 and beyond(Task A, Day 2)..My solution has the correct complexity. 87801797

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

The "BO" in "BOI" stands for "Big Oof"

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

What's B doing in a serious competition? I've seen/solved both parts multiple times, hell I even set a problem that uses the same ideas as B2.

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

    Why did you "set a problem" that you had already "seen/solved both parts multiple times" of before? Was that for a non-"serious competition"?

    Jokes aside, all problems at BOI go through a review process involving multiple people, both from the official jury and the representatives of all delegations, taking into account aspects like difficulty, originality, amount/quality of meaningful subtasks, as well as all that in the context of the other problems. The problem in question may not be the most original one (heck, truly original problems are so rare tbh) but it was decided to (and ultimately turned out to) serve its purpose well.

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

      Was that for a non-"serious competition"?

      It was for Topcoder SRM, yes.

      it was decided to (and ultimately turned out to) serve its purpose well.

      That's pretty bad if there were no better problems than repost of a repost of a repost. I mean we used tree diameter with dynamic edge lengths last year in CEOI, but that was because I couldn't find it solved anywhere despite a lot of effort even though it's a standard HLD.

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

        The problem was not well-known among the BOI contestants. Only five contestants could solve it (http://www.boi2020.lv/results.html).

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

          You realise that for schoolkids, not even something completely standard like finding SCC would be well-known? You're in effect making an argument for total copypasting.

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

            SCC would be well-known to many BOI participants. Many of the participants know basic competitive programming topics, but they don't know all "standard" problems in the world.

            By the way, I don't think B is a standard problem, I haven't seen it anywhere before. (Yes I know you can surely show some contest where it has appeared.)

            A good way to select problems for a contest is to choose problems that are interesting to the real participants of the contest, instead of an imaginary audience that knows all the problems.

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

              SCC isn't that basic. How many people would be able to write it correctly? It's quite tricky to get right unless you have enough experience. Well-known as in "I know what it is", sure. Well-known as in "I just write the solution automatically and it works"? I'm pressing X for doubt.

              A good way to select problems for a contest is to choose problems that are interesting to the real participants of the contest, instead of an imaginary audience that knows all the problems.

              Like I said, an argument for copypasting.

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

When will be the test data open?

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

gen Евгений ,а вы можете открыть тесты и решения других пользователей ? В Day 2 ,все открывается .

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

yeah