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

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

Всем привет!

Сейчас проходит первый тур Открытой олимпиады школьников по программированию, а уже завтра состоится второй. Олимпиаду подготовила Московская методическая комиссия, известная вам также по Московской олимпиаде школьников по программированию, Московской командной олимпиаде и олимпиаде Мегаполисов (раунды 327, 342, 345, 376, 401, 433, 441, 466, 469, 507, 516, 541)

Открытая олимпиада составляется из самых интересных и сложных задач, которые были предложены многочисленным коллективом наших авторов, поэтому мы решили провести рейтинговый раунд Codeforces, который состоится 08.03.2019 12:05 (Московское время) и будет основан на задачах обоих туров олимпиады. В каждом дивизионе будет предложено 6 задач и 2:30 на их решение.

В связи с этим мы просим всех участников сообщества, участвующих в соревновании, проявить уважение к себе и другим участникам соревнования и не пытаться читерить никоим образом, в частности, выясняя задачи у участников соревнования в Москве. Если вы узнали какие-либо из задач Открытой олимпиады (участвуя в ней лично, от кого-то из участников или каким-либо иным образом), пожалуйста, не пишите раунд. Участников олимпиады мы просим воздержаться от публичного обсуждения задач. Любое нарушение правил выше будет являться поводом для дисквалификации.

Задачи соревнования были подготовлены vintage_Vlad_Makeev, isaf27, Flyrise, cdkrot, GlebsHP, ch_egor, Zlobober, qoo2p5, grphil, achulkov2, Schemtschik, akvasha, mingaleg, V--o_o--V, wrg0ababd, под руководством ch_egor, cdkrot, GlebsHP, Zlobober и Андреевой Елены Владимировны.

Задачи для второго дивизиона были доработаны KAN и MikeMirzayanov, которому мы также говорим спасибо за системы Codeforces и Polygon, который использовался при подготовке задач этой олимпиады.

Всем удачи!

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

Div.1

  1. sunset
  2. Petr
  3. Radewoosh
  4. ko_osaga
  5. orbitingflea

Div.2

  1. appplese
  2. al3xstr33t
  3. Charlene_Hao
  4. ytxytx
  5. QDEZ604

Разбор скоро появится

UPD: Разбор

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

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

Раунд состоиться

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

You mean round #545?

Edit: got fixed.

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

i wish this contest will be my chance to become candidate master

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

    I wish this comment is your chance to get out of the negative :p Good luck bro <3

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

Just be careful with any streams.

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

it is like asking thieves not to steal.

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

Hopefully this contest will not end up with "Let's solve problem just for fun"

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

is it rated?

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

Another potential unrated round :)

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

Hope not two unrated contest happening in a week..

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

Looking forward to solving a problem by kun :D

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

Not a good timing for Indians. :(

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

We should believe in Codeforces that they won't make mistakes any more. (ง •_•)ง

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

Not a suitable contest timing for Indians. :(

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

Why everyone should know that this contest is based on Moscow Open Olympiad in Informatics? I think it is better to hold information like this in secret or announce it after the end if the cheating is possible.

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

    Well you need to be able to tell people that know the Moscow Open Olympiad problems not to take this contest. There's no easy way to tell people this without outright saying that the contest shares at least some problems.

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

      I believe there are better ways than make it public. Even if you know the solution but the statement is changed it will take some time to realize it. But there won't be enough time (and purpose) to spread it across the community.

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

Best contest time for Japanese! Yeah!!!

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

╮(╯_╰)╭, just have fun~

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

When will the editorial be published?

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

Meanwhile in my timezone

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

Scoring distribution?

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

О да, и раунд напишу, и с девушкой вечером погуляю...

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

getting "you have already submitted this code" for all submission I'm making .-.

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

CF rounds quality is coming down everyday and we see more and more(unbalanced,unrated,unusual,...) rounds...

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

У автора закончились идеи на новые задачи , так что теперь он просто изменяет текст условий предыдущих

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

ewww moscow

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

Can't solve last 2, but all problems were interesting. :)

(Also need to go back to sleep now).

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

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

A few unbalanced round. (maybe not a few).

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

Is it only me or every one that thought this contest was unbalanced?

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

Kudo for the pretests :D
Btw, anyone have any ideas of pretest 16 of Div1C? :D

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

    I fixed RE16 with #pragma comment(linker, ”/STACK:36777216“) (using MS C++17)

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

      Woah, that doesn't work for me. Must be some other segmentation fault I haven't figured out :<
      Still, thanks, I didn't expect this one anyway ;)

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

How to solve Div2. B?

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

Saw a bug in my A after I locked in. Feelsbadman

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

How do you do Div. 2 B? :O

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

    Is it just some nasty casework?

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

      No just find all four types and use two for loops such that you check all the possibilities, by using the given conditions and two FOR loops you'll be able to check all the possibilities if nothing satisfies, print -1.

      The four types are

      1. a[i]=0 && c[i]=0
      2. a[i]=1 && c[i]=0
      3. a[i]=0 && c[i]=1
      4. a[i]=1 && c[i]=1

      Now use two FOR loops to check the number of type 2 people and number of type 3 people in group 1, then you can figure out type 4 needed.

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

Was Div2 F only simulation of tortoise and hare algorithm?

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

I tried to hack one of the solution, I uploaded script (which generates testCase) several times, but all the time, there was Generator compilation error. Could you teach me how to hack using generator scripts?

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

    You must strictly follow the format of the input data up to spaces and line breaks; For example, in problem Div2 A script generator would be

    #include <iostream>
    using namespace std;
    
    int main(){
        int n = 100000;
        cout << n << endl;
        cout << 1 << " ";
        for (int i = 1; i < n; i++){
            cout << " " << 1;
        }
        cout << endl;
        return 0;
    }
    

    make sure that you have cout << endl; in the end of the code and spaces in right place; here is a generator that will not compile (because of unnecessary spaces int the end of line)

    for (int i = 0; i < n; i++){
            cout << 1 << " ";
        }
    
»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

How to solve Div2. B?

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

    I solved (pretest passed) it this way:

    Let a, b, c, d be number of index with (0, 0), (0, 1), (1, 0), (1, 1) respectively. If you select A, B, C, D of the types in the order, then these should hold: A + B + C + D = N / 2 and C + D = b - B + d - D. Using the second one you can say that A - D = N / 2 - b - d.
    Now, you can brute force on A, D and whenever you find one brute force on B, C.

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

That moment when you solve C and D but cant solve B :(

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

Was Div2 F(Div 1D) only simulation of tortoise and hare algorithm?

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

It took me 30 minutes to realize that in C the tour can last more than one week. Granted, if that wasn't the case, the problem would be equivalent to Hamiltonian path, and in the second sample the path lasts 6 days, but I still think that the problem was unclear. Nowhere in the statement does it say that the tour can last more than one week :/

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

    I had the same problem with not understanding it at once.

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

    Exactly, I was scratching my head for long time as well figuring out why are they asking me variation about k-path problem which I know is pretty hard to solve. Need to look up explanation of sample as well.

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

B on div2, is hardest B question I ever see in codeforces . what's the goal of designing such question ?

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

Thanks for an amazing contest!

Solution for D:

Move (0, 1) and (0) (2 operations) while their positions don't coincide. If we have done k such operations we must have 2k ≡ k(mods), . Now start moving all the pieces together. After t moves they all will be at the desired point: as 2k + t ≡ t(mods), pieces 0, 1 will get there, while 2, 3, ..., 9 will obviously get there for the first time.

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

I solved A, and then I just read problem B -> C -> D -> B -> C... again and again...

CF 545 made me iterator function...

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

B on div2, is hardest B question I ever see in codeforces . what's the goal of designing such question ?

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

How to find t in div1D? (if I not mistaken we can find c due to fixed players on positions with index 2^i, before first time we meet fixed player)

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

Fun fact: Problem D is used as a subroutine in algorithm for subset sum in O(20.86n) time and polyspace.

I have seen this on a lecture a few days ago, which explains why I was so fast in solving this problem :P.

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

In div1C was O(N*D) the correct time complexity of the solution? I had TLE 11 witk making a graph with nodes associated with pairs of cities and days ( n*d nodes, m*d edges) What were other aproaches?

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

    Exactly :|... Got this solution pretty fast and sank for a long time in microoptimizing it and didn't make it pass 11th test :|...

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

    For any strongly connected graph there exists a number g such that, for every vertex v and sufficiently large k there exists a cycle of length gk which passes vertex v. Intuitively you can think about the GCD of all cycles. It is not, but something similar.

    If you decompose a graph into SCCs, you can calculate such g in linear time. Now you can do a DP with a state as (vertex, length mod d), and transited for every edges and SCCs. This is O((n + m)d), but the DP routine is just array scanning, so my non-optimized code runs in 0.3s.

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

      thank you

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

      Good solution! I tried to solve it in this way but failed in the contest.

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

      Good solution! I tried to solve it in a stupid way but failed in the contest.

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

        You are a Pinkie Pie too? And you are repeating my words!

        Didn't Twilight return all my clones back to the Mirror Pool, did she?

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

      To compute that value g for every connected component you have D*(number of nodes of CC)? Can you do better than this?

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

        For all cycles created by back edge take its length. For all two disjoint path created by forward edge take the difference of length of two paths. g is a gcd of them. So it is simple dfs.

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

Even additional half an hour didn't help me to solve B and C. I guess they were hard not only for me.

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

Div1 AB may be a little bit too easy.But I just have no idea about Div1C...

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

When I see a problem from school olympiad in which you have to optimize constant for O(dn) solution...

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

Am I the only one that thought that D was easier than A, B, and C :)

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

What is solution for C div 1 ?

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

    Build a graph where the vertices are (u, t) where u is the node and t is the time modulo d. Then, connect (u, t) to (v, (t + 1)modd) for all edges . Compress the SCCs of this graph and do DP on DAG. The key fact is that if there is a path from (u, j) to (u, j'), then there is also a path from (u, j') to (u, j) (by going through the cycle more times), so you won't overcount cities.

    I had to do a lot of optimizations to get pass the pretests though, maybe there's a simpler method........

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

      Do I also have to do DP in the SCC?

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

      "I had to do a lot of optimizations to get pass the pretests though, maybe there's a simpler method........" — actually you don't need simpler method, you need harder one :P. At least that's what my friends did in order to omit recursion on 5mlns vertices. It seems you can divide just original graph into SCCs and then do some weird shit with remainders like counting GCDs of all cycles within every SCC etc. Overall complexity is O(nd) anyway, but recursive part is only O(n) and that's supposedly a profit xd.

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

      I tried some optimizations to PP but I got FST:( I think both the time limit and the memory limit are too tight.

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

that contest was tough one..

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

can anybody help me in knowing why my solution to div2 d is giving wrong answer on pretest 6. sol link : https://codeforces.com/contest/1138/submission/51026146 Thanks in advance

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

    I also kept getting WA test 6 but then I realized that there is an edge case. Consider the input:

    00001111

    101

    With my original code it would have outputted: 10110100 and it would have only contained 2 instances of t.

    But you can actually get more than 2 instances of t because the strings can overlap, so the optimal result would be: 10101010 which is actually 3 instances of t.

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

    Oh, I knew this algorithm. Too bad I wasted the whole contest on C...

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

    That's a bold statement. I knew this algo and couldn't solve this problem for more than half an hour.

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

      Floyd's algorithm is the first thing that popped up in my mind seeing the problem. I wonder if anyone solved it with a different approach.

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

      That's weird, I see no difference between this algo and problem D xd.

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

        My bad. I knew the idea about moving two pointers with speeds 1 and 2, usually that's enough for all things like Pollard-rho.

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

wanted just 2 or 3 secs more. Coded the correct solution for B, going to submit and contest over.

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

Please judge my first prepassed solution on Div2D! The difference between my first solution and second solution is just number of comparisons of hash value of intervals.. I got TLE on second :(

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

very nice contest ^_^ thank you all

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

I got WA on test 70 for D :( I knew it was too good to be true.

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

Why it always have to be so long time after a contest to wait to submit my solution

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

how to solve div2 D?

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

    Maybe : Find first position i in string t such that t[i...n] is equal to some prefix of t i.e equal to t[1...n-i+1]. Then build new substring from that position keeping count of zeroes and ones left. Hashing can be applied.

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

    you can solve it very easily using some help of Z_function algorithm which tells you which idx can be prefix of the same string example:

    string s="11000110"

    you can see that at idx 5 will have a prefix to the main string which is 110 (that's what the z_function get) so from here you can deduce that after you made up the first string just concatenate the remaining string starts from idx 3. i hope you understand what i meant to say.

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

I tried to hack one of the solution, I uploaded script (which generates testCase) several times, but all the time, there was Generator compilation error. Could you teach me how to hack using generator scripts?

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

What's with upsolving?

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

Hi guys, I hope you enjoyed round!

In case you wonder why upsolving is not available yet -- it's intended, since the onsite events haven't finished yet. It will be open in roughly 2-3 hours.

About editorials, we will be happy to publish them after we finish with the onsite as well.

Thanks!

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

My Solution For Problem E can be hacked by n = 1, m = 3e5. Then we preform 299998 times 3 1000000000 1000000000, and then we perform 2 999999998 (10^9 — 2) and then go 2 1. In this way my solution (and many of solutions that get passed) will get a number exceeding the upper bound of the type long long. I think the test is too weak.

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

    This is forbidden, isn't it?

    Also it's guaranteed that the integers Ai will not grow too high. Formally, it's guaranteed that if we sum the largest addition over all events of the 3-rd type (that is, b + (n - 1)·s, where n is the number of cars at that moment) then the acquired sum would be at most 1018.

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

      Sorry, maybe I don't think my data is forbidden. For example, in your code.
      ~~~~~ pts.push_back({r, -overall_b — overall_s * (r — l)}); ~~~~~ "-overall_b — overall_s * (r — l)" this sentence will lead to a exceeding of long long.( And This is not the real value! It's just a tag.) And I have carefully checked that my data satisfies the conditon mentioned in the statement.
      ^_^

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

Is here any other guy's solution for 2c/1a is O(n^2*log(n)) and got tle? I used treap and the time limit seems too tight for me,LOL My brain is quite strange :\

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

What is test 70 on Div2D/Div1B?

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

-100 rating hmm nice number that made forget how terrible I did

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

The contest has ended and it shows Final standings but I am unable to make any submissions. Is it a bug or am I missing something here? It says you need to be registered for the contest. Edit1: I believe I am not the only one who might have missed kun's comment. For those who have gone ahead to downvote, it would be helpful if you could mention the reason for the same.

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

    From kun's comment above

    "In case you wonder why upsolving is not available yet -- it's intended, since the onsite events haven't finished yet. It will be open in roughly 2-3 hours.

    About editorials, we will be happy to publish them after we finish with the onsite as well."

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

when it will be available to submit a solution?!!

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

    It will probably take a couple more hours since the onsite event hasn't ended yet as kun has mentioned above.

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

Tricky Contest##!!##

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

How can I submit my code after the contest? It says I am not registered for the contest :(

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

I missed the contest. Is there any way to participate virtually? I see no options there.

Edit : Thanks. Got it.

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

meme

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

Hello, What is the souliton of div1 C, div2 E?

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

Does anybody know how to get/copy a test case that is finished with the ellipsis "..."?

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

    You really want to debug your code on a test case that is finished with the ellipsis "..."?

    I think there is now way now.. but you can go through other test cases from a AC solution and get a smaller test case that gives WA for you

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

div2b can anyone plz tell me what's wrong with my 51023192 . the basic idea is:

for 1st performance i iterate over all possible clowns (clowns+both_skilled).all the other both_skilled goes to 2nd performance. then i take some acro in the 2nd to make it equal . then rest of the acro goes in 1st performance. and rest of the clowns go the 2nd. and fill others with no skill actors. if all verifies i take that number of clown and print

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

How to solve div2D / div1B?

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

Ahhhh...
Finally that's my best rating change (+318) ever...
Here is my personal log on the contest:

  • 0min Start. Don't know whether to participate.
  • 15 mins. Read C,D,E. Thinking on C and fail.
  • 25 mins. Come up with the idea of E. Decide to participate and start to write B.
  • 34 mins. PP on B, reading A.
  • 51 mins. PP on A, start doing E.
  • When doing E, I basically debugged for around 20 mins just because I made the order between the slope and the intercept wrong when I read the b and s in the task (i.e. read in the order s b instead of b s).
  • 98 mins. PP on E, trying to do C and D.
  • The ten friends in D is really misleading. Finally when I figured out that 3 of them would be enough, it is already 145 mins after the start. In a rush I finished the last piece of code (and made it wrong for the first time) and submitted on 148 min. PP.

Before the contest I wanted to get around +200 to get myself a yellow, but the result is really good for me. Thank you all for the fun and exciting round!

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

How to solve D1C/D2E?

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

What is test 73 for div1C?

It looks like many people failed on it (including me)

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

cdkrot, I found some accepted codes of F is quiet similar, why no skip? 51026411 51023578 51025400 I don’t believe that there is such a coincidence.

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

Why I get RE on test 8 for div2 problem B ?? https://codeforces.com/contest/1138/submission/51062872

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

Why I get RE on test 8 for div2 problem B?? https://codeforces.com/contest/1138/submission/51062872

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

cdkrot MikeMirzayanov KAN

https://codeforces.com/contest/1138/submission/51062541

https://codeforces.com/contest/1138/submission/51021650

are exactly the same for the problem 1138C, yet I got a TLE during the contest.

Any chances for getting it rejudged?

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

    If you get AC during a contest and TLE in upsolving with the same code, do you want a rejudge too?

    I think CF already runs a solution a second time if it gets TLE.

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

so, where is the editorial? it's about two o'clock(UTC+8).

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

0rating

Now that's a first...

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

I got Accepted in 1138B - Circus in Div. 2 with Brute force on a, b, c, d (which are the numbers of different types of artists).

I just want to know how to prove the time complexity of this algorithm?

My submission is 51069702.

Thanks for everyone. :)

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

    The if condition in your second nested for loop is a bit unintuitive, but apparently squeezing the search space considerably so that you solution passes. Also you don't need the 4th for loop (over cnt[2]), you can simply assign the value of c using n, a, b and d

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

      I have been understood your reply.

      So I can easily prove that the time complexity of my solution is O(n2).

      Thank you, sincerely. :)

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

My O((N + M) * d) solution for Div2 E. / Div1 C. times out on test case 18. Could anyone tell me what is causing this? https://codeforces.com/contest/1137/submission/51080307

Edit: TLE resolved by making the DP iterative.

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

In question 1.C I got RE The main problem is

void bfs(int x,int y){
	if(vi[x][y])return; vi[x][y]=1;
	V.push_back(mp(x,y));
	for(int l=e1.son[x];l;l=e1.nextt[l])if(tong[e1.ed[l]]==tong[x])bfs(e1.ed[l],(y+1)%d);
}
// bfs is actually dfs

If you change the vector to an array, you can get AC

In fact, the dfs depth of the program can reach 5000000

Why is that?

Specific can see

51145858 51016401

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

-

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

ohhh thats so cute of you to congratulate me, you didn't have to, <:)

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

    I don't think it is a cute act to report cheating. I think everyone wants the game to be fair, so I don't think it is unnecessary to report cheating