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

Автор cyand1317, история, 8 лет назад, По-английски

Here and there, summer's in the air! (I beg your forgiveness, residents of the Southern Hemisphere... > <)

I'm delighted to invite you to Codeforces Round 487 (Div. 2), which starts at Jun/11/2018 16:35 (Moscow time). Please note that the timing is, as usual, unusual.

This is my third time creating a contest from scratch. Along the way can be seen the efforts of: KAN the super-ultra-hyper-mega-meta coordinator, who has reviewed, refined and translated the problems; 300iq, Livace, mike_live, Noam527, RobeZH, and Tommyr7 the super-ultra-great-delicious-wonderful testers, that have populated our collection of solutions; and MikeMirzayanov along with the super-ultra-extreme-awesomazing Codeforces/Polygon team, who have made all these happen in the way it is! Kudos to all of you!

The round will be rated for contestants from the second division, and the first division are welcomed as out-of-competition participants. There will be five problems to work on for two hours. The scoring distribution will be announced later, because of... love.

Despite my illiteracy, I included the stories in the hope that they'll be inspiring to some; feel free to skip them, if you'd like to fully concentrate on problems themselves.

We wish everyone a fun experience and a fair rating. We'll be pleased to have you on the contest!

Gone are the freshness and beauty of springtide, which raises the downheartedness in Mino the poet, as in many other poets. Mino's best friend, Kanno the painter, however, is intrigued by the changing palettes brought about by the seasons. On this day, their journey in search of spring begins...

UPD 1 The scoring is standard: 500–1000–1500–2000–2500. It's however strongly recommended to read other problems if you're stuck, since you may not necessarily find later problems harder. Good luck!

UPD 2 Congratulations to top contestants! Also big kudos to all participants!

Div. 2 Top 5

  1. olphe
  2. jorik
  3. amnesiac_dusk
  4. UtahaS3npai
  5. espr1t

Overall Top 5

  1. olphe
  2. mjhun
  3. Inner_x_Peace (First to solve E!)
  4. kobae964 (_That_ close! Integer division, maybe?)
  5. jorik

UPD 3 The editorial is out, see you there!

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

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

Cool announcement.

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

We need more announcements like this

This is the best round announcement ever

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

It says that first division will be out of competition. Even 1900-2099 ?

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

Can you share the two round number you are talking about?

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

Really enjoyed reading announcement. Specially —
Here and there, summer's in the air! (I beg your forgiveness, residents of the Southern Hemisphere... > <)
Please note that the timing is, as usual, unusual.
Gone are the freshness and beauty of springtide, which raises the downheartedness in Mino the poet, as in many other poets. Mino's best friend, Kanno the painter, however, is intrigued by the changing palettes brought about by the seasons. On this day, their journey in search of spring begins...

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

Programming Contest is my drug.

Codeforces is my dealer.

Thanks Codeforce for two consecutive contests in two consecutive days.

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

Is it true or not that 300iq have 300iq?

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

the super-ultra-great-delicious-wonderful testers. Delicious ???

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

It is your way of writing that is awesomazing :D LIKE THIS ANNOUNCEMENT <3

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

cyand1317's round again!

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

it's will be nice contest for every participants

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

Hmmm.So bot[Noam] is replacing Human as Problem Setter :P

Only Discord Server will get it xD

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

Friends are the worst.

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

Hope everyone could play the game well.Besides,how to increase my contribution?My contribution is below 0.

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

cyand1317, you could change time and date as per this comment

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

Looking forward to this contest, good luck and high ratings.

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

Best announcement on CF!!!

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

My rating have just become 2101 after the educational round in yesterday. This round suddenly becomes unrated to me :(

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

Wow, Chinese contest creater.

And such a cool announcement!

Hope that the problems will be as friendly as the announcement.

( And without terrible DATA STRUCTURES.. XDDD

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

Will Mio and Yuko be the characters of problem statements?

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

Is there a hacking round in this? If yes, what are the rules regarding the same?

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

Huge problem statements -_-

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

1hour passed && only 1 Pretest Passed on problem D!.Really?Is it Div2 Contest?Or Typical Chinese round??

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

OMG, Prob.D&E is too hard...!

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

problem E will give nightfall to everybody

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

1324 hacked

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

What's the intended solution for E? I had idea for matrix exponentiation, but was getting WA on 3 :/

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

    Maybe I got the mistake in my thinking :|

    I was trying to find the answer for individual lines only, disregarding the fact that multiple lines can coincide :|

    But then this probably makes the problem much harder than what I thought during contest

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

How to solve c?

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

how it is possible that in Problem-2 output for test case 2 2 .. is no?

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

    If p=n, then p is always a period. In other words, if x is the length of the string s, then x is a period of string s.

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

      p is a period of the string s if "for all i, 1 <= i <= |s|-p". Now if p == n, then there does not exist any i which satisfies above constrained. Don't you think this was ambiguous?

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

        No, I don't think so. The problem doesn't tell "There is an 1<=i<=|s|-p so that s[i]==s[i+p]", it tells "for every 1<=i<=|s|-p s[i]!=s[i+p]".

        Prove that 5 is not a period of the string "01101". Show such 1<=i<=0 so that i-th and (i+5)-th characters of "01101" aren't the same. You can't because there is no 1<=i<=0 so that i-th and (i+5)-th characters of "01101" aren't the same. So it is a period of the string "01101".

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

D is only about pen and paper :)

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

hack for B: n=2,p=1,s=".."

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

Problem E? What problem E? I don't see problem E but hundreds lines of my code for C & D.

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

Not a good contest.

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

less than 1000 people worked out more than 2 problems

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

C fucked me up, was there an easy way I missed? Can anyone explain the solution?

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

Does anybody know the possible hack for problem B?

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

In problem B, can p<=n condition be established? if p==n, 1<=p<=0 .

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

D is very near to this one: D. Contact ATC

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

In question B, I got wrong answer in pretest 2 and I got penalty of 50 points. Wasn't it the rule that if your solution fails in pretests given in problem statement as samples then you won't get any penalty.Someone please clarify

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

I got WA because print one whitespace after the answer. (http://mirror.codeforces.com/contest/989/submission/39151664 WA) (http://mirror.codeforces.com/contest/989/submission/39155233 still WA) (http://mirror.codeforces.com/contest/989/submission/39155400 pretest passed)

Umm.. Although this is my fault, I have never been wrong answered at least by writing '\n' or by inserting whitespace after the answer during every CF round I have participated in. I wasted few minutes(about 10min) and get one penalty because of this.

Is it possible to remove my first wrong attempt? Or is this just my mistake?

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

For problem B what's the answer if n == p?

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

OMG second contest in a row i need 1 more second to press on submit button :D

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

So, as it seems to me, this round was really strange...

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

In Problem B, if p == n, we get a strange inequality of 1 <= p <= 0. So I think this problem has error regardless of answer.

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

    I'm not sure how you derived this, but thinking about it from the perspective of the problem, this condition shows that the period = n, so the answer is always NO, since we can choose the periodic function to be whatever string is given. Clearly there is no logically inconsistency, so your formulation must be incorrect.

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

    Yes it kind of amazes me that the setter penalizes for such a case which is ambigous.I was on the verge of solving C and then my solution got hacked due to this thing n==p and it never came to my mind that this could be the error.Really disgusting from a contestant point of view.

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

I have seen something "interesting".

When you know your rating will decrease, you asked your friends to copy — paste solution to get skipped. Then your rating will not decrease xD

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

i was using substr function in my solution for the given question and was getting a runtime error in the case , but when i did the basic implementation it worked, not getting the runtime error as even a string of 100 letters worked fine on my compiler here is my solution link can someone help

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

in problem B the given statement is,

a positive integer p is considered a period of string s if for all 1 ≤ i ≤ |s| — p, the i and (i + p)-th characters if s are the same.

so, if p == n there is no valid i which satisfies the given condition, hence there is no valid period, so shouldn't the answer be "YES" is this case. Costed me four WA.Can anyone provide any explantion!!! thanks

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

'C' really made me crazy lol kkkkkkk was tough to me

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

I've written down several equations about Problem D, but thrown it away eventually. And I realized that wind speed is always positive after the contest. :P

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

Interesting problems, especially C. Can someone explain its solution?

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

That may not be the problems called 'Stupid problems'.Thanks for your work @cyand1317!

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

C is similar to this problem

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

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

Woaah... So many WAs on Problem B. :|

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

Why answer is "No" when p == n in B?

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

Regardless of whether the answer is always No, I do not think that the problem is not valid because there is no |s| that has length satisfying p==(n=|s|) and 1<=p<=|s|-p.

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

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

And Problem B, Why

http://mirror.codeforces.com/contest/989/submission/39152340

is Accepted?

9 3 101010001

4th and 7th is same so answer is No. but this source print 101010001. I try to hack this source, but console does not appear.

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

Отличный контест. Спасибо авторам

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

I have met C before this round in atcoder.So it's unfair to those who did not meet it before.

»
8 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится -8 Проголосовать: не нравится
Input:
3 2
.0.
Output:
001(or 100)

This test data for #B was not added in the system test. It's seems that many AC codes can't pass this data.

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

and yet another hackforces round ends

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

Where can I found problems like C? I need to practice problems like it, I am really slow with those problems

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

Auto comment: topic has been updated by cyand1317 (previous revision, new revision, compare).

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

Can someone please help me with my submission for problem B (test case 31) ? http://mirror.codeforces.com/contest/989/submission/39155370

EDIT:- when comparing character, I wrote if(c==1) instead of if(c=='1') and it costed WA.Damn :(. How the hell did it pass the pretests?

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

Ok, I am really confused here, this submission:http://mirror.codeforces.com/contest/989/submission/39169572 gets runtime error on test 3 while this one:http://mirror.codeforces.com/contest/989/submission/39170689 gets AC. All I do is switch the condition i<s.size()-2 to i+2<s.size(), why are they not equivalent? I spent nearly an hour of the contest trying to figure out my mistake, can anybody tell me why this happens so I don´t do it again?

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

В том дело что участник den_tar списал у меня код, поскольку ми находились в одной комнате. А про совпадения в решений с участником vera2005, я ничего не знаю, скорее всего это просто случайность.

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

deleted

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

Finally blue :'( Thanks @cyand1317 for this wonderful contest.

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

It's however strongly recommended to read other problems if you're stuck, since you may not necessarily find later problems harder. Irony at its best.

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

I certainly didn't like the contest, statements were way too poetic, and more prescicely problem B's. Besides I performed extremely bad (not because the poems, of course). On the other hand I liked problem C (didn't solve it either).

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

    Though a valid definition, it would've been clearer if we had explicitly stated that p = n is a period. We'll try to make the statements even better in the future. Meanwhile, there is always the option to request a clarification during contest :)

    Best wishes.

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

No DP or graph problems at all? :(

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

Problem B is wrong for p == n. Should have been unrated.

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

Can anyone explain problem E to me ??

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

duliu

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

Here and there, summer's in the air! (I beg your forgiveness, residents of the Southern Hemisphere... > <)

Summers always in the air!! Brazil <3