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

Автор tokitsukaze, 5 лет назад, По-английски

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 Jul/12/2019 17:35 (Moscow time).

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. wiwitrifai

Div.2:

  1. RannRu

  2. cyy233cnbb

  3. AnandOza

  4. puppies_and_rainbows

  5. calabash_fool

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

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

I am sofa

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

sjf!!!!!

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

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

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

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

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

CSL nb!!!

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

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

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

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

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

Why do Chinese prepared such late contest?

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

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??

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

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

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

      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.

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

memerich

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

I hope the round would not be unrated...

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

Seeing this announcement,I remembered Chtholly Nota Seniorious.XD

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

What a warm invitation !!!!

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

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

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

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

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

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.

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

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

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

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

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

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. (ฅ´ω`ฅ)

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

So, does anyone else remember 897C - Nephren gives a riddle? Such a pity there would be no anime pics, I liked those...

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

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

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

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

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

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

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

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

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

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

gl & hf all

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

Why can't you have simpler names?

»
5 лет назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится
  • Can you stop playing games?
  • No, Because I am sjf.

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

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

Loving the GameForces

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

Tokitsukaze change your handle to Alice, Bob or Petya please

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

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

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

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

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

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

    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 :/

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

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

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

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

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

Fun to solve, not to read

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

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

the answer is 1.

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

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

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

How to solve F? What is hack for D?

  • »
    »
    5 лет назад, # ^ |
    Rev. 7   Проголосовать: нравится +1 Проголосовать: не нравится
    • 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]
    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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

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

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

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

How to solve Div 2 C problem?

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

    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

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

    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.

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

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

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

      How?

      Can someone post the link to their code?

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

        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.

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

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?

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

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

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

    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.

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

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

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

    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.

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

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

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

How to solve Div2-D ??

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

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

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

    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

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

    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.
    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

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

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

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

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

      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.

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

        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.

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

      another special case:

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

      Second player wins because first player cannot make first move.

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

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.

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

    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!

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

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...

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

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

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

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

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

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

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

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

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

    How do you solve DIV2 D?

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

      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.

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

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?

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

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

    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...

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

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

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

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

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

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

    #define first sjfnb

    #define second cslnb

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

      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?

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

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!

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

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

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

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

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

    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.

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

      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)

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

    Masochists

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

    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.

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

Die (almost) X-P

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

Fast System Testing Start. :)

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

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

I'm hacked too.

So sad :<

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

what is testcase 6 in d2D?

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

    Like this :

    4

    1 1 4 4 or 1 1 1 4

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

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

Speedforces and Typeforces :/

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

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 :(

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

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 ;;;;

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

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

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

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

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

Kuroni nb

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

Очень интересный контест!!!!

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

div2A....kancolle NB!

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

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.

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

    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.

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

      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.

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

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

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

    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.

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

    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 :(

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

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

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

    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 :(

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

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

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

    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

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

    U really outputed "sjfnb"? No characters wrong?

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

    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 aza-zil's comment is more reasonable.

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

    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"

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

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

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

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

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

    probably sjf is tokitsukaze initials

    csl is probably 2014cais01 initials

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

    basically saying the winner is super great

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

    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.

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

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 ?

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

How to solve Div1D/Div2F?

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

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.

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

    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})$$$.

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

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

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

        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

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

          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?"

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

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.

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

    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.

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

Is 912 not a triplet ? In probelm B Div2

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

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?

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

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

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

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

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

congratulation to cerberus97 for becoming International Grandmaster.

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

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

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

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!

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

When will the editorials for the problems be published?

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

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

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

    By default ceil takes double argument.

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

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

I am not able to understand Div 2 B Please Help

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

I'm sjf and csl.