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

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

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
  • Проголосовать: не нравится

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

I am sofa

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

sjf!!!!!

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

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

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

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

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

CSL nb!!!

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

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

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

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

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

Why do Chinese prepared such late contest?

»
7 лет назад, скрыть # |
 
Проголосовать: нравится -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??

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

memerich

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

I hope the round would not be unrated...

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

Seeing this announcement,I remembered Chtholly Nota Seniorious.XD

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

What a warm invitation !!!!

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

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

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

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

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

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

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

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

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

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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. (ฅ´ω`ฅ)

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

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

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

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

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

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

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

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

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

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

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

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

gl & hf all

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

Why can't you have simpler names?

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

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

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

Loving the GameForces

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

Tokitsukaze change your handle to Alice, Bob or Petya please

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

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

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

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

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

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

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

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

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

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

Fun to solve, not to read

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

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

the answer is 1.

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

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

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

How to solve F? What is hack for D?

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

How to solve Div 2 C problem?

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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?

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

How to solve Div2-D ??

  • »
    »
    7 лет назад, скрыть # ^ |
    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)

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

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

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

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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?

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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!

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

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

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

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

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

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

    Masochists

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

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

Die (almost) X-P

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

Fast System Testing Start. :)

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

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

I'm hacked too.

So sad :<

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

what is testcase 6 in d2D?

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

Speedforces and Typeforces :/

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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 :(

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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 ;;;;

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

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

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

Kuroni nb

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

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

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

div2A....kancolle NB!

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

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

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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

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

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

»
7 лет назад, скрыть # |
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 ?

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

How to solve Div1D/Div2F?

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

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

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

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

Is 912 not a triplet ? In probelm B Div2

»
7 лет назад, скрыть # |
 
Проголосовать: нравится 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?

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

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

congratulation to cerberus97 for becoming International Grandmaster.

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

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

»
7 лет назад, скрыть # |
 
Проголосовать: нравится +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!

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

When will the editorials for the problems be published?

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

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

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

I am not able to understand Div 2 B Please Help

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

I'm sjf and csl.