tokitsukaze's blog

By tokitsukaze, 3 months ago, In English,

What do you do on Friday evening? Are you busy? Will you take part in our round?

Hello, Codeforces!

We are glad to invite you to take part in Codeforces Round #573 (Div. 1) and Codeforces Round #573 (Div. 2), which will be held on 12.07.2019 17:35 (Московское время).

The round will be rated for all participants from both divisions.Participants in each division will be offered 6 problems and 2 hours (to be determined) to solve them. Both divisions will share 4 problems.

The problems were written and prepared by 2014CAIS01, tender, teitoku, winterzz1, chenjb, Subconscious, Claris, quailty, skywalkert and me.

Thank to:

If you are not busy, please take part in our round on Friday evening! We wish you good luck and high rating!

The score distribution will soon be published.

UPD1: Some of authors will be at the Discord CP Community to discuss the problems after the coding phase. However, please follow the rules and don't discuss the problems before or during the contest by any means.

UPD2: List of contributors is a bit changed, and the scoring distribution will be:

  • Div.2: 500 — 1000 — 1500 — 2000 — 2500 — 2500

  • Div.1: 500 — 1000 — 1500 — 1500 — 2250 — 2750

UPD3: Sorry for forcing you to spell our nicknames, 'tokitsukaze' and 'quailty', and some ambiguity in the statements. Anyway, we sincerely appreciate your participation.

UPD4: Editorial

UPD5: Congratulations to the winners!

Div.1:

  1. Um_nik

  2. Benq

  3. ATS

  4. tmwilliamlin168

  5. Rifai

Div.2:

  1. RannRu

  2. cyy233cnbb

  3. anand.oza

  4. puppies_and_rainbows

  5. calabash_fool

 
 
 
 
  • Vote: I like it
  • +415
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it +41 Vote: I do not like it

I am sofa

»
3 months ago, # |
  Vote: I like it +20 Vote: I do not like it

sjf!!!!!

»
3 months ago, # |
  Vote: I like it +8 Vote: I do not like it

sjf!!I will take part in this excellent round!!I am so excited.(ps,Green Pineapple is so cute.)

»
3 months ago, # |
  Vote: I like it +222 Vote: I do not like it

ac automaton fail tree dfs-sequence build persistent segment tree suffix automaton next-pointer DAG figure out SG function

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

CSL nb!!!

»
3 months ago, # |
  Vote: I like it +3 Vote: I do not like it

Does the first paragraph mean the contest will be anime themed?

»
3 months ago, # |
  Vote: I like it +29 Vote: I do not like it

Curiously, I wonder if there are any colorful pictures in this round?

»
3 months ago, # |
  Vote: I like it -51 Vote: I do not like it

Why do Chinese prepared such late contest?

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it +88 Vote: I do not like it

    The contest will start at the time when I arrive home after getting off work :(

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +115 Vote: I do not like it

      Wish you a job promotion :)

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +36 Vote: I do not like it

      996 Working, _________ :(

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        I think we're 007, wake up at 0:00 go to bed at 24:00 (the same as 0:00), work seven days each week.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it -6 Vote: I do not like it

    I think that's because Chinese students always get home late

»
3 months ago, # |
  Vote: I like it -148 Vote: I do not like it

I suppose this blog will get around 200 upvotes before the contest actually begins. But somehow if the round gets unrated how much downvotes will it get. Any guess??

  • »
    »
    3 months ago, # ^ |
      Vote: I like it -21 Vote: I do not like it

    Does that sound harsh??. It might but that's the truth. 300 upvotes to 700 downvotes. That's what happened with arsijo's round.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +18 Vote: I do not like it

      At least show them some respect bro... they work hard to prepare the contests so we can learn something new or we can get better at something we already know.

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it -32 Vote: I do not like it

        Are you a fool or your English is weak. I also said the same thing. It's easy to downvote when some minor mistakes is committed by the round writers. 1000 people downvoted arsijo's post after the round got unrated. That is bad. Their hard work should be respected.

»
3 months ago, # |
  Vote: I like it +125 Vote: I do not like it

memerich

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    It happened a week back

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +54 Vote: I do not like it

    That's because Hello 2019's contribution has been halved.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Why

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it +22 Vote: I do not like it

        The contribution that you get from any post depreciates ~6 months after it is earned.

        • »
          »
          »
          »
          »
          3 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          By depreciate you mean it gets halved

          • »
            »
            »
            »
            »
            »
            3 months ago, # ^ |
            Rev. 2   Vote: I like it 0 Vote: I do not like it

            According to this post, "all votes for posts and comments are divided by two every 180 days". I think it behaves like "half votes" rather than "half contribution".

            • »
              »
              »
              »
              »
              »
              »
              3 months ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              Oh didn't know about that

»
3 months ago, # |
  Vote: I like it -48 Vote: I do not like it

I hope the round would not be unrated...

»
3 months ago, # |
  Vote: I like it +17 Vote: I do not like it

Seeing this announcement,I remembered Chtholly Nota Seniorious.XD

»
3 months ago, # |
  Vote: I like it +11 Vote: I do not like it

What a warm invitation !!!!

»
3 months ago, # |
  Vote: I like it +14 Vote: I do not like it

Wish an interesting round, at least more interesting than the China Regional Qualitfier for TI9 of DOTA2, or I'll switch to that.

»
3 months ago, # |
  Vote: I like it +29 Vote: I do not like it

Congratulations for organising your first CF round! I really look forward to this contest :)

»
3 months ago, # |
  Vote: I like it +3 Vote: I do not like it

What do you do on Friday evening? Are you busy? Will you take part in our round?

Looks like (SukaSuka) reference. Hope the round not gonna be like the end of this anime.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

"Friday evening" for Chinese, as I understand?)

»
3 months ago, # |
  Vote: I like it -16 Vote: I do not like it

It's a big gap between two contest so far for me on codeforces.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    You are experienced, so the gap will not fact i guess :)

»
3 months ago, # |
  Vote: I like it +18 Vote: I do not like it

Congratulations on the first competition you have prepared is finally about to begin.

I also want to prepare a competition in the future (time is a bit tight). QAQ

sjf ddw. (ฅ´ω`ฅ)

»
3 months ago, # |
  Vote: I like it +41 Vote: I do not like it

So, does anyone else remember 897C - Загадка Нефлены? Such a pity there would be no anime pics, I liked those...

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +26 Vote: I do not like it

    Chtholly is the best!

  • »
    »
    3 months ago, # ^ |
    Rev. 3   Vote: I like it +43 Vote: I do not like it

    (It's an old picture, the Chinese words are: Normal people's CF, aces' (or maestros') CF, my CF)

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      QwQ 哈哈我之前看到过这张图,我觉得非常贴切呢!

      Haha,I have seen this picture before.I think it's very appropriate!

»
3 months ago, # |
  Vote: I like it -33 Vote: I do not like it

Hey everyone, I'm new here. What should I do before the contest starts?

»
3 months ago, # |
  Vote: I like it -10 Vote: I do not like it

sjfnb!!cslnb!!!sjf ddw!!!!

»
3 months ago, # |
  Vote: I like it +22 Vote: I do not like it

Though Chinese round again... i say csl nb!!!

虽然又是中国场 但我还是要说:csl nb!!!

»
3 months ago, # |
  Vote: I like it +5 Vote: I do not like it

A good time for North America! I wish everyone luck!

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

All the best to all :)

»
3 months ago, # |
  Vote: I like it +10 Vote: I do not like it

gl & hf all

»
3 months ago, # |
  Vote: I like it +22 Vote: I do not like it

Why can't you have simpler names?

»
3 months ago, # |
  Vote: I like it +30 Vote: I do not like it
  • Can you stop playing games?
  • No, Because I am sjf.

In div2,there are 4 games in 6 problems. sjf Orz...

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Better focus on contest mate

»
3 months ago, # |
  Vote: I like it +70 Vote: I do not like it

Loving the GameForces

»
3 months ago, # |
Rev. 2   Vote: I like it +177 Vote: I do not like it

Tokitsukaze change your handle to Alice, Bob or Petya please

»
3 months ago, # |
Rev. 2   Vote: I like it +25 Vote: I do not like it

Please, Alice comeback from wonderland and also bring Bob back home. Bob the builder will make a nice home to you.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +54 Vote: I do not like it

    Your wish is my command!

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      So, Alice will return from Wonderland during Global Round?

»
3 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

»
3 months ago, # |
  Vote: I like it +106 Vote: I do not like it

disgusting. very easy problems. single fuckup -> -60 rating.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +86 Vote: I do not like it

    Seriously how does this keep happening? How is it possible that every other round turns into a speed contest like this one? None of the easy problems were even interesting this time, and E/F don't seem fun either :/

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Round was good.. Had fun solving it.

»
3 months ago, # |
  Vote: I like it +3 Vote: I do not like it

A<D<C=B (B considering implementation..)

»
3 months ago, # |
  Vote: I like it +120 Vote: I do not like it

We should thank god for parents who gave us such simple names

»
3 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Fun to solve, not to read

»
3 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Pretest 9 of Problem B might be like this : 1m 3m 5m

the answer is 1.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yup, I missed that and realised it quite late.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Many wrong solutions passed pretests for div2 D. RIP rating.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve F? What is hack for D?

  • »
    »
    3 months ago, # ^ |
    Rev. 7   Vote: I like it +1 Vote: I do not like it
    • For each y remember all x's
    • Iterate through all y from biggest to lowest
    • Now you are at y'. Add all current x's to your segment tree. (If ST[x] is already 1 then skip it).
    • You know count of all points (which y >= y') at any segment. It is easy to calculate the number of rectangles that include your point(curX,y')
    • num = (cntPoints(prevX + 1, curX - 1) + 1) * (cntPoints(curX+1,1e9)+1), where cntPoints(l,r) — number of different x's at segment [l,r]
    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Isn't 1 to 10^9 too huge a range to use a segment tree? Should I do some kind of compression?

      • »
        »
        »
        »
        3 months ago, # ^ |
        Rev. 2   Vote: I like it +1 Vote: I do not like it

        You can either compress all numbers, or use compressed segment tree (which i used)

»
3 months ago, # |
  Vote: I like it +1 Vote: I do not like it

How to solve Div 2 C problem?

  • »
    »
    3 months ago, # ^ |
      Vote: I like it -9 Vote: I do not like it

    How to wait for editorial to get published

  • »
    »
    3 months ago, # ^ |
    Rev. 3   Vote: I like it +1 Vote: I do not like it

    store all special items in an array, and keep one variable li: the last index of the page you are viewing. initially it is k. now run a while loop and in each iteration remove all elements from back of array that are less than li, if you removed t elements, li+=t; now flip pages till arr.back() (last element in array) is less greater than li (flipping page is li+=k) .

    edit (thanks @spookywooky) : code https://codeforces.com/contest/1191/submission/56918688 note: idk if it will get hacked, but I dont think there are any corder cases

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      You could have posted the link to your code, more easy to understand ;)

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    use the following function: page(x,deleted) = (x-deleted)/k if ((x-deleted)%k != 0) and (x-deleted)/k-1 otherwise.

    Sort all special items.

    After this just use this function to delete as many as have the same page as the first item, then actualize deleted. And do it again untill all are deleted.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    a map in C++ should do the job, plus the count of removed elements till now :D

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      How?

      Can someone post the link to their code?

      • »
        »
        »
        »
        3 months ago, # ^ |
        Rev. 4   Vote: I like it 0 Vote: I do not like it

        Add the elements to the map and say i iterate till my map size is not zero, so if my current removed element count = c, and say the element at beginning of map is a,then i remove elements from map which are less than k*(floor((a — 1 — c)/k) + 1) + 1 + c

        and increment operation count and remove count.

»
3 months ago, # |
  Vote: I like it +16 Vote: I do not like it

I don't understand the fourth test case of Div1C. Whatever move player A makes, there should be exactly one card that has different side up from the rest. Why doesn't B flip that card and win, as opposed to playing for a draw?

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    It is not flipping but setting an interval to some value. So, this is a valid move for A 0011 -> 0011.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    players don't flip the numbers, but they assign all 0s or all 1s to them, so the first player can just assign 0 to the first number, so it remains 0011.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    You can flip a card $$$0$$$ to $$$0$$$. Not necessarily changed.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +32 Vote: I do not like it

    Yeah, after wasting a few minutes I realized that it's painting rather than flipping. I asked a "question" saying the statement is confusing and flipping means changing 0 to 1 and 1 to 0. Meh.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The first player can play to not change the state at all. Change the first card (which is already 0) to 0.

»
3 months ago, # |
  Vote: I like it +9 Vote: I do not like it

How to solve Div2-D ??

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Hint: No one can get the opponent into a situation that his opponent can't make a move. (Except when n=1)

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I think that the final sequence is 0 1 2 3 .... for sorted numbers before the very final move of the game, so with some boundry cases, the major part is reducing the current sorted array to that state

  • »
    »
    3 months ago, # ^ |
    Rev. 3   Vote: I like it +23 Vote: I do not like it

    Solution (Div2D / Div1B)

    • If first player cannot make any of possible first move, first player loses. To check whether it is yes or no, just brute force what pile will the first player chooses. To reduce time to $$$O(N log N)$$$, you can use a data structure: for example, map.
    • Otherwise, the final state of the number of stones for each pile will be {$$$0, 1, 2$$$}, {$$$1, 2, 0$$$}, {$$$5, 4, 2, 3, 9, 6, 1, 8, 0, 7$$$} or something, that appears number from $$$0$$$ to $$$N-1$$$ exactly once. So, you can determine the number of steps. If odd, the first player wins. If even, the second player wins.

    I can give some example that you can easily solve:
    • $$$a = $$${$$$0, 0, 1$$$} : Second player wins because first player cannot make first move.
    • $$$a = $$${$$$1, 2, 2$$$} : Second player wins because first player cannot make first move.
    • $$$a = $$${$$$1, 3, 3, 3$$$} : Second player wins because first player cannot make first move.
    • $$$a = $$${$$$2, 5, 5$$$} : First player wins because the number of steps is $$$(2 + 5 + 5) - (0 + 1 + 2) = 9$$$, and it is odd.
    • $$$a = $$${$$$1, 2, 4$$$} : Second player wins because the number of steps is $$$(1 + 2 + 4) - (0 + 1 + 2) = 4$$$, and it is even.
    • $$$a = $$${$$$8, 6, 9, 1, 2, 0$$$} : First player wins because the number of steps is $$$(8 + 6 + 9 + 1 + 2 + 0) - (0 + 1 + 2 + 3 + 4 + 5) = 11$$$, and it is odd.
    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Can we reduce this game to n-NIM game and can find grundy number?

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      "a = {1, 2, 2}", I missed such corner cases. Thanks :)

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Bro can you please explain what is wrong in 56933353. I did exactly same as you said, but i am getting wrong answer on pretest 6.

      • »
        »
        »
        »
        3 months ago, # ^ |
        Rev. 2   Vote: I like it 0 Vote: I do not like it

        You are failing in some testcases. For example, $$$a =$$$ {$$$1, 4, 4, 4$$$}. For this case, since first player cannot make his first move, the answer should be second player (cslnb). But your code outputs that first player (sjfnb) wins.
        I think that's because you are forgetting the pattern that there are $$$3$$$ or more piles are initially the same number of stones.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +2 Vote: I do not like it

      another special case:

      $$$ a = \{5,5,8,8\} $$$

      Second player wins because first player cannot make first move.

»
3 months ago, # |
  Vote: I like it +29 Vote: I do not like it

I have one suggestion to Codeforces.
This time, the solved of problem C was 293 though the solved of problem E was 14. I think that Codeforces should make sure to adopt at least one problem which the number of solved is greater than 30 and less than 150, to make contest enjoyable for every rating colors.


Except this issue, this contest was totally good.

  • »
    »
    3 months ago, # ^ |
    Rev. 3   Vote: I like it +34 Vote: I do not like it

    In div2,this situation also appears.

    The solved of porblem D was 1229 but the solved of E and F were both less than 100.I think that we should prepare problems that can differentiate the coders whose ranks are between 100 and 1500.

    Despite this,the contest was really nice!

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I found a Div2D/Div1B solution(passed pretests) didn't use long long when $$$n*(n+1)/2$$$ in the last minute. Didn't get enough time to hack it. RIP my rating...

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +6 Vote: I do not like it

    Overflow shouldn't change the remainder mod 2. How can you hack it?

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      The overflow happens when multiplying. This time the parity won't change, but it may after dividing 2.(Maybe?)

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it +11 Vote: I do not like it

        Okay, you need the remainder mod 4 for that, which also doesn't change.

        • »
          »
          »
          »
          »
          3 months ago, # ^ |
            Vote: I like it +3 Vote: I do not like it

          Hmm... Anyway thank you for that.(At least I won't be so sad like this lol)

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How do you solve DIV2 D?

    • »
      »
      »
      3 months ago, # ^ |
      Rev. 2   Vote: I like it +3 Vote: I do not like it

      First, check if you can move the first step:

      • two or more zeros, then you can't.
      • three or more same numbers, then you can't.
      • two or more same numbers(let it be $$$x$$$), and $$$x-1$$$ exists, then you can't.
      • two or more same numbers(let it be $$$x$$$), if there are more than one $$$x$$$, then you can't.
      • otherwise you can.

      If you can, it can be easily proved that the final status is $$$0,1,2\dots n-1$$$. Just check the parity.

»
3 months ago, # |
  Vote: I like it +475 Vote: I do not like it

Why did we have to again write ckahsdfkajsd or sufguwietqjdfgsa, depending on which player wins? Can't you use First and Second? Adam and Bob?

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +38 Vote: I do not like it

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +203 Vote: I do not like it

    Bonus 2: two consecutive game problems with different things to print. In case you already remembered what means what.

    Bonus 3: if something then print quailty...

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +157 Vote: I do not like it

      OMG, I thought it's "quality". Glad that I copypasted it.

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it +65 Vote: I do not like it

        Got WA1, thankfully it is not -50.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +177 Vote: I do not like it

    B Print "sjfnb" (without quotes) if Tokitsukaze will win

    C: print "tokitsukaze" (without quotes) if Tokitsukaze will win

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +18 Vote: I do not like it

    Just code without reading about what to print if the first player wins, then test the examples to get what to print.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +27 Vote: I do not like it

    #define first sjfnb

    #define second cslnb

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      This again...

      Problems would be better without printing words that are hard to spell. And how should you know what happens when you run your program. Do we have to use ifdefs and compilation flags too?

»
3 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Is it just me or did anyone else just assume after reading 30<=x<=100 in Problem A that HP cannot exceed 100? Because, that's how it works in games, right? XD Hard luck!

»
3 months ago, # |
  Vote: I like it +3 Vote: I do not like it

It took me more time to read names than the whole question :) Anyway, Enjoyed the round

»
3 months ago, # |
  Vote: I like it +32 Vote: I do not like it

So does someone actually enjoy geometry tasks or are they just there to make contestants' lives miserable?

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +65 Vote: I do not like it

    Well, geometry problems on integers and with thinking are fine. This one was pleasant in terms of precision issues but still quite standard. What I wish for sure is that they got rid of details like (0, 0) point or two points in the same position. It's so easy to make a problem slightly nicer.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +15 Vote: I do not like it

      Well, I think you make a very good point. I will learn this lesson and do it better next time~(First time ever in Codeforces Round)

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Masochists

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +48 Vote: I do not like it

    If having to use single acos makes your life miserable then it is a bad sign. I hastily copypasted my thousand lines geometry library but ended up using just a definition of a point, function norm and wrapper for calling atan2 (both are oneliners). I can ask the same question about neverending problems with data structures. I actually enjoy geometry problem and that one was super pleasant even for people that hate geo.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it
»
3 months ago, # |
  Vote: I like it +24 Vote: I do not like it

Die (almost) X-P

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Hope you won't fst :>

    Good luck to you

  • »
    »
    3 months ago, # ^ |
      Vote: I like it -11 Vote: I do not like it

    I also had a hard time today on problem B . Couldn't get AC during contest . I was writing cases like hell . Then during systest thought of a solution and it pass after contest . my submission .

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same here! Barely clutched it out.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Fast System Testing Start. :)

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

As I know, the input 3 2 3 3 can hack almost half of solution in 2D :<

I'm hacked too.

So sad :<

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

what is testcase 6 in d2D?

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Like this :

    4

    1 1 4 4 or 1 1 1 4

    the answer is cslnb because it's impossible to remove any stone.

»
3 months ago, # |
  Vote: I like it -8 Vote: I do not like it

Speedforces and Typeforces :/

»
3 months ago, # |
  Vote: I like it +33 Vote: I do not like it

Though I didn't want to say so, still I'll risk saying that regardless of how the questions were, the problem statements were quite irritating for me :(

»
3 months ago, # |
  Vote: I like it +10 Vote: I do not like it

it took me an hour to solve question B , i got confused and wasted a lot of time there ... hence was only left about half an hour for other questions... wish i had thought earlier ,what i did in it after wasting hour ,it was such a easy question ;;;;

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes easy question with easy implementation too . You can check my submission , though i was unable to get AC during contest . , coz of thinking and writing all cases like hell . :(

»
3 months ago, # |
  Vote: I like it +10 Vote: I do not like it

so many edge cases on problem D div2(probably i didnt get it right) :(

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    i hacked my own solution after locked but no one else). it Must have to fail system tests(just waiting for failation)

»
3 months ago, # |
  Vote: I like it +8 Vote: I do not like it
»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

div2A....kancolle NB!

»
3 months ago, # |
  Vote: I like it +124 Vote: I do not like it

To be honest, this is the worst round I've been competing in Codeforces.
The problems are not determining a contestant's ability to solve problems but rather determining a contestant's ability to: [think for corner cases, hack others' solutions, read the problem statement well, distinguish between 'quailty' and 'quality', etc]. Problems should be more focused on algorithmic thinking and the ability to improve an algorithm though some problems can be focused on implementation alone.

It's not because I am bad at this round, but this is really out of my expectation.
Sorry if that's rude, no offenses, but I hate this round.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I agree with you for Div-2 ABC but I find D to be interesting, but then again there is difference between your ability and mine.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +19 Vote: I do not like it

      I think what he meant was that implementation part was too much in this contest, rather than to think of a cleaver way to approach a question.

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it +13 Vote: I do not like it

        Yep. For me, I think it would be better if the problems focused less on implementation/corner cases debugging.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    I agree with the second and fourth ability, but it is hard for me to agree with first and third ability(especially the first one). Those are also a part of solving problems.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +45 Vote: I do not like it

    Last two problems seem fine, but probably most contestants spent too much time on dealing with corner cases in other problems to get to E and F :(

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    I think the problems are good, the bad part is output format, pretests, the order of problems and so on.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    The main point I disagree with this round is that when I cannot solve some problems, I cannot solve because of bugs or corner cases. Usually, for most of the other rounds, I cannot solve because I cannot think of a better solution, or I cannot think of a way to implement something.

    This is why I dislike this contest :(

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

i don't understand why my submissions in problem D div.2 wrong in pretest 3 but i copy it and run in my computer it show right answer

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Happens at time due to different in compiler version or other such issues , try custom invocation to get exact answer that codeforces uses to validate

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    U really outputed "sjfnb"? No characters wrong?

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I guess the reason is you used a variable as the length of an array. But due to the long queue of system testing, I can't use the custom invocation to test it.

    UPD: it seems that XxxzeroxxX's comment is more reasonable.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      it 0:30 AM but i have too see what wrong with it....

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    I believe that's because you have had to initialize j with zero while you didn't, on my compiler it initialized it with 1, so on the first iteration it becomes 2 and prints "cslnb"

»
3 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Div-2 D pretests probably miss a case like this : 4 1 6 7 7 since I found a solution giving 1st player to win when in this case the 2nd player is supposed to win

»
3 months ago, # |
Rev. 2   Vote: I like it +13 Vote: I do not like it

can someone please tell me what do "sjf nb" and "csl nb" mean ?!

  • »
    »
    3 months ago, # ^ |
    Rev. 2   Vote: I like it +13 Vote: I do not like it

    probably sjf is tokitsukaze initials

    csl is probably 2014cais01 initials

    i guess nb -> 牛逼 -> strong, awesome

    basically saying the winner is super great

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +32 Vote: I do not like it

    Besides, csl stands for the real name of 2014cais01, while sjf is stands for Shi Jin Feng. So what does Shi Jin Feng mean? It's a character in a Japenese game, whose Japenese name is tokitsukaze. And the Chinese name of tokitsukaze is Shi Jin Feng, so tokitsukaze-->sjf.

    This is tokitsukaze (SO CUTE)

    By the way, nb stands for “牛逼”, and I consider that the better translation of it are supposed to be shit(for praise) or dope, since 牛逼 is a sort of bad language in Chinese.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      This round should be Educational))

      It's like "come to CodeForces and learn some new (and very cute indeed) japanese anime characters"

»
3 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

I don't know why my solution for problem D got WA on pretests though I see I have considered all the cases according to some AC'ed solutions. Can anyone point it out ?

»
3 months ago, # |
  Vote: I like it +6 Vote: I do not like it

How to solve Div1D/Div2F?

»
3 months ago, # |
  Vote: I like it +65 Vote: I do not like it

I see that many people dislike your problems, in contrary, I really enjoyed C and E. F also would be nice, but why $$$10^{18}$$$? Why test depth of our library, not our knowledge? I seriously considered hacking other people instead of writing F just because I don't have prewritten factorization.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    F is to against Baby-Step-Giant-Step. It was $$$10^{12}$$$ (for 1D) at first, and then we realized it's similar to $$$10^{18}$$$ (for 1F), which is more impossible to pass by solution in $$$\mathcal{O}(\sqrt{n m})$$$.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it +22 Vote: I do not like it

      $$$10^{16}$$$ would be enough to break $$$O(\sqrt{nm})$$$ but allow $$$O(\sqrt{m})$$$ factorization.

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it -24 Vote: I do not like it

        Yeah, but it will be a 1E. And the setter for 1E at present doesn't want his problem to be more difficult, so... T_T

        • »
          »
          »
          »
          »
          3 months ago, # ^ |
            Vote: I like it +67 Vote: I do not like it

          I don't see how demanding fast factorization increase difficulty of this difficult problem. Obviously all participants who have a chance to solve this know about existence of fast factorization algorithms. So you just ask "OK, you solve the problem. Do you have prewritten factorization?"

»
3 months ago, # |
  Vote: I like it +15 Vote: I do not like it

Whenever i copy a solution from codeforces and paste it on any editor and compile it, it shows stray in the program error example, can anyone tell me the reason why is it happening.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    These CE errors indicate non-ascii characters in your code. Most likely unseen special whitespaces, in your case. Try deleting them following the line number and position given by the CE message then retry.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is 912 not a triplet ? In probelm B Div2

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Am I missing something or in Div1 B rules don't exclude two players winning simultaneously?

If the piles are [$0, 1$], then first player loses because after his move there are two same pile sizes, but also second player loses because before his move all piles are $$$0$$$.

I asked a question and received a clarification that first loses in this case. Is it just "by convention", or it's written in the statement somewhere and I can't see that?

  • »
    »
    3 months ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    After the first player plays, he looses. The first player looses at the end of his turn, before the second player tries to play.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Fantastic contest. No advanced algorithms or DS required , at least, for the first 4 problems in div 2 yet the difficulty is balanced. pretty creative

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    also div2 e problem, you just need a binary search.

»
3 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Div2 D...test #32... for input 1 1...csl will win! Because sjf cannot drop the only one stone.

Sorry... I just noticed that it's "before" not "after"... FeelSad

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Wish I can finish it before the contest close...

»
3 months ago, # |
  Vote: I like it +11 Vote: I do not like it

congratulation to cerberus97 for becoming International Grandmaster.

»
3 months ago, # |
  Vote: I like it +1 Vote: I do not like it

2nd question was much complex than and lengthy than third question

»
3 months ago, # |
  Vote: I like it +13 Vote: I do not like it

Something about div2a (I think nobody cares)

This is a system called Player Ship Protection Mechanisms(轟沈ストッパー in Japanese, 沉船保护 in Chinese)
When damage is greater than remaining HP, this protection will be triggerd. Actual damage formula is as follows. HP refers to remaining HP.

$$$ \text{Damage} = \left \lfloor \frac{HP}{2} + 0.3 * \big ( \text{randint} \in \left [ 0 , HP \right ) \big ) \right \rfloor $$$

According to this formula, HP in the form of 4n is most likely to be heavy damaged(remaining HP ≤ 25%, also called 大破 or taiha) from full HP in one hit, which is an important state in this game.

Although the influence of the form of max HP is not absolutely, it is usually considered 4n+3 is the best form and 4n is the worst form, which is different from this problem.

By the way, the way of increasing HP limit in the game is getting married(仮). But player can't decide the amount of increased HP limit. The amount is decided by ship type and model. (This is a problem! Don't be so serious!)

Further reading:
https://kancolle.fandom.com/wiki/Combat/Damage_Calculation#Player_Ship_Protection_Mechanisms (English)
https://wikiwiki.jp/kancolle/%E6%88%A6%E9%97%98%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6#h2_content_1_13 (Japanese)
https://zh.kcwiki.org/wiki/%E6%88%98%E6%96%97#.E5.85.B3.E4.BA.8E.E2.80.9C.E9.98.B2.E6.B2.89.E4.BF.9D.E6.8A.A4.E2.80.9D
https://zh.moegirl.org/zh/%E8%88%B0%E9%98%9FCollection/%E6%88%98%E6%96%97#%E8%A2%AB%E5%BC%B9 (Chinese)

Yes, you are right. I came to promote this game. KanColle hajimaruyo!

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Oh, I don't have much research on this problem. In my impression, 4n+1 is the best:3

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    btw, I don't know if you found out, 2C/1A is also based on KanColle.

    • »
      »
      »
      3 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Handing over quests? emmmm I think that's a bit different if click from top to bottom.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

When will the editorials for the problems be published?

»
3 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

why does ceil(394779268306930212.0/394779268306930211.0) produce 1 as output?

  • »
    »
    3 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    By default ceil takes double argument.

    ceil((long double)394779268306930212/394779268306930211) (gives 2)

»
3 months ago, # |
  Vote: I like it +1 Vote: I do not like it

I am not able to understand Div 2 B Please Help

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm sjf and csl.