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

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

안녕하세요, 코드포스! (Hello, Codeforces!)

I'm super happy to introduce you to Codeforces Round #566 (Div. 2), which will take place on Jun/11/2019 16:05 (Moscow time).

The round will be rated for all Division 2 participants, yet any Division 1 participants are welcome to join us out of competition.

You will be given 6 problems and 2 hours to solve them. Score distribution will be announced later.

The listed handles below are contributors. Thank you for all who listed!

This is my first Codeforces contest ever. I hope everyone who will join this contest enjoy. Thank you!

WINNERS:

  1. Castor
  2. thecodinglizard
  3. puyu_liao
  4. UoA_Kanade
  5. abandonedw1
  6. average_frog_enjoyer
  7. orz_liuwei
  8. emengdeath
  9. ashutosh450
  10. hyfzbtrs

UPDATES:

  1. Let me spread the meme from McDic Minecraft Telegram group — Ggungah.
  2. Score distribution is 500-750-1250-2000-2250-2750.
  3. Editorial is available.
  4. Congratulations for the winners!
  5. I am sorry for weak systests for B and F. Sorry again.
  • Проголосовать: нравится
  • +514
  • Проголосовать: не нравится

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

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

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

Best of Luck for your first contest as a problemsetter.

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

Wa! A Korean round!

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

upvote if you believe there will be kpop tasks in his korean contest

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

Hit you with that ddu-du ddu-du du~

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

I wish everyone high rating!

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

Korean round will be amazing!!!Oh my my my, oh my my my! I've waited all my life. Oh my my my, oh my my my! Looking for something right:)

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

Why Hello is 안녕하세요 but Codeforces is 코드포스 which is shorter than Hello?

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

Waa~~ It will be Good Good Round~~ :)

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

korean round <3

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

It will be good round :D

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

How does it feel to have div2 after div3?

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

BTS brought me here!!

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

i hope there will be short questions !

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

Apologize

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

"...Thank you all who listed!:
- myself, arsijo
- myself
- arisjo
- tester — [some testers and myself]
- Mike"
tm McDic

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

Finally your round has arrived! Congrats! :D

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

The contest has extra-registration?

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

I hope a once wins your round :D

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

Unusual time for the contest, again

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

I wish it will be a great contest . Thanks for this Effort

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

... and who is the mother? did cf and polygon got born by bipartition?

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

크으.. 국뽕에 취한다.. Cheer up McDic !

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

I want to do last contest as a Specialist. -> Blue

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

sees a codeforces round
Me: Codeforces round yay!
notices it's korean
Me: Codeuposeu round assa!

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

BTS bring me here

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

한국어를 공부하는 사람으로서 한글을 보니 매우 기쁘네요!

대회가 잘 되길 바랍니다^^

Я очень счастлив, потому что я учу корейский язык!

Я ожидаю, что этот раунд будет хорошим соревнованием^^

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

Is it rated up to 2100 rating like many other div2 contests?

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

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

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

Maybe the reason for the unusual time of the contest is Iran vs South Korea soccer match!

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

Let me fly up to Purple on gookbbong round~~~~~~~~

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

Do you guys think doing a contest after anesthesia is a crazy idea?

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

퍼플가게해주세요...(Let me go to Purple this round)

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

Hmm. Why does nowadays always 6 problems? Is this only fast coding?

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

https://t.me/mcdic_ch

If anyone needed link to his minecraft telegram channel...

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

It seems that I haven't got the ability to solve problem D as it scored 2000. (smog

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

Seeing the score distribution , i guess it is (speed + implementation) contest.

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

hi team :)

is the contest rated for div 3?

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

That's why I love $$$ $$$ ̶M̶a̶t̶h̶f̶o̶r̶c̶e̶s Codeforces

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

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

What an amazing implementation contest!

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

In D why answer is not center of tree ?

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

How to approch E ?

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

how to solve C ??

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

    sorting first by the number of vowels, then alphabetically, on the one that ends, and then we create two arrays and run by the sorted, we look at the neighbors, if the letters are 2 words, then we sort again and see if the number of letters is equal, then it is 1 word. sorry, i don't know English very well.

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

Shitty fast typing contest.

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

I think in problem C finding m is enough and printing lyrics just makes problem complicated.

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

How to solve E ??

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

Any idea about pretest 16 in C? Is this logic wrong: For a given word,check if there is a word with same vowel count and same last vowel. If it isn't there,Try to check if there's something with same vowel count.

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

C was devastating :))

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

Many submission will fail at problem B, i did 4 hacks and was close to 5th.

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

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

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

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

A: quite nice

B: cases

C: probably some cases too, didn't think of this task

D: quite an easy idea I think, shitty to implement

E: maths

F: maths

I'm sorry, but I didn't find any of these tasks entartaining, very bad problem set (for me).

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

my code shows this output on C Idk why
2
that first
the this
mcdics about
wow round
edit:never mind stupid erase mistake

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

RIP B

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

B = hackforces

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

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

If honestly I don't understand. Pretests must be weak or this was just occasionally? I mean hacks like '.' and '*' and test 23 and so on. I understand that it is my fault but all in all pretests was too weak.

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

How to calculate power of c in question E ?

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

Seems like I have to give 2-3 contests to just come back to my original rating now :(

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

it`s a time to be expert ^^

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

E and F was math problem. I think that F was pretty good, because there isn't many Trigonometry Problems

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

What is the test case 23 in div 2 B . My submission is fail on it test case 23 https://codeforces.me/contest/1182/submission/55452743

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

Can someone check what's wrong in this solution for C? https://codeforces.me/contest/1182/submission/55451525

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

In problem E, I am facing a doubt: I initially thought that I can condense the problem to the powers of f1,f2 and f3(ignore the c power for now). The powers of f1,f2 and f3 will be the nth, (n-1)th and (n-2)th term of Tribonacci sequence. But the powers will be in form of mod(10e9+7). As we know (a^b)mod M != (a^(b%M))%M ex: a=2,b=5,M=3, how do i effectively get the answer?

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

For test case 35 of problem B My compiler gave a 'NO' but codeforces custom invocation is giving 'YES' and I think I handled the case on which it is failing.

here is my submission:

Can someone please tell me why is this happenning?

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

Can you check my idea for solving "E"? In my point of View we can calculate degrees of F1, F2, F3, C F1's degree is Fib(n)

F2's degree calculates by: F(1) = 1; F(2) = 2; F(3) = 3; F(n) = F(n — 1) + F(n — 2) + F(n — 3) F2's degree equal to F(n);

F3's degree calculates by: F(1) = 1; F(2) = 2; F(3) = 6; F(n) = F(n — 1) + F(n — 2) + F(n — 3) F3's degree equal to F(n);

C's degree calculates by: F(1) = 2; F(2) = 6; F(3) = 14; F(n) = F(n — 1) + F(n — 2) + F(n — 3) C's degree equal to F(n) + (2 * n — 6)

Is my solution right? I got problem with Fast Computing "Tribonachi's"

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

anyone can help me ? my code in problem B get wrong on test 23 But i test it locally and i get it OK

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

Congratulation to puyu_liao

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

Make it unrated

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

For E,I have an idea.

It's easy to calculate the power of f1,f2 and f3.I have a way to calculate the power of c easily. The transfer matrix:

0 0 1 0 0

1 0 1 0 0

0 1 1 0 0

0 0 1 1 0

0 0 0 1 1

By using this,we can change [a,b,c,d,e] into [b,c,a+b+c+d,d+e,e]

The formula of the power of c is f[i]=f[i-1]+f[i-2]+f[i-3]+2*i-6

Let a=f[i-2],b=f[i-1],c=f[i],d=2*i-6,e=2

So now we can transfer it.

The initial matrix is [0,0,0,2,2],because f[1]=f1*(c^0),f[2]=f2*(c^0),f[3]=f3*(c^0).

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

It was what I worried about. If my country's users set problems for the first time and there was some factors that can be issue, next time my country's (other) users set second problems, people won't expect much.

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

Well balanced problem set, nice.

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

problem c: is it valid? this first wow i .

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

Can anyone provide me a clear explanation on D? I thought many things non of them worked properly/on-time.

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

Guys, what is the time complexity of rating changes calculation? Why does it take so long? Can't wait already =)

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

E can also be solved using Reeds Sloane Algorithm(extension of BM for non-prime modulo). Link

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

Test case is weak for problem C, there is no case present in the systests where no. of vowels of a string is more than 100000. I used that number as an array index in some part of my code, got AC even after I miss sized the array.

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

Anyone who can take a look at my solution for E? 55469911

I have no clue why it passed on small range input but failed on the bigger ones.

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

Attention!

Your solution 55457716 for the problem 1182C significantly coincides with solutions Athena_1111/55457716, Anti-Mirzayanov/55458879, gandhipaaji/55458903, shreyanshgeek_unofficial/55458966, Harsh_jiit/55459119, turtle407/55459150, kaptaan/55459742, firefox/55459961, shivansh100/55460142, Izanagi/55460447. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.me/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

I just got this message. I want to clarify (especially for people who are not aware of that) that I was using the online compiler ideone.com (I was using it for the past 3 contests and nothing wrong had happened before) without knowing that apparently my code was public (I didn't even know that this feature exists). I have not copied the code of anyone!! You can check the timing ( MY SOLUTION WAS SUBMITTED FIRST & I AM 100% SURE AND RESPONSIBLE FOR MY WORDS). I have written every line of this code!!! I haven’t even used functions from any website. It really pains to receive this message in the first contest where I do well. What a luck!!!!!!! :/ Be just.

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

Why was I skipped in Codeforces Round #566 (Div. 2), but counted rating.

HELP!HELP!HELP!

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

I wonder if there's a solution for D using tree hashing, which I tried but failed.

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

shit. load shedding caused my specialist dream.

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

stupid Solution for D:

There are two possible types of vertexes, corresponds with the statements of the task:
1. One of the leaves
2. Vertex in the "middle" of the tree.

If there is only 2 vertex -> answer 1
If there is only 2 leaves -> answer is one of them

First of all, let's run bfs from each of leaves, and mark all the vertexes with their depths.
(depth[leaf] = 0, depth["middle"] is the maximum). Now, if vertex with maximum depth is unique, lets check it.
After, we need find one vertex with degree greater then 2 (it is always exist because of quantity of the leaves). Run bfs2 from it.
////Let's define nearest vertex with degree greater then 2 for current vertex like a good.
In this bfs, we need mark all vertexes by the pairs = {distance(current vertex, good vertex), index of the good vertex}.
It easy to proof, that if answer is possible, than there is only one leaf with unique pair {distance to its good vertex, quantity of leaves that correspond for this good vertex}. Now we just need to check this leaf.
code: 55487910

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

Why is my code for E giving wa on test case 5?

Got the error ignore.

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

weak tests for D
test
9
1 2
2 3
3 4
4 5
2 6
4 7
3 8
8 9
answer should be 9
https://codeforces.me/contest/1182/submission/55494688 gets AC but it shows -1 for this case.

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

Regarding question C during the contest I submitted first one Then I found a small mistake and changed it to second one. If you compare both submissions the change was a variable n for a constant value. It was accepted, but then just out of curiousity I resubmitted my first submission third one you can compare it with my first one and it is literally the same, and I got AC with this.

However this is clearly wrong I mean you can test it with a small case ( 4 aaaaa aaaaa aaaaa aaaaa) My first and third submissions return 0 which is wrong and my second one returned 1 which is correct. So I'm not complaining about the fact that I lost points by fixing something that was wrong but would have been accepted anyways, I'm just wondering maybe the test cases are really weak or not good enough.