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

Автор cdkrot, история, 8 лет назад, По-русски

Привет, codeforces!

Рад пригласить вас на рейтинговый раунд #493, который состоится в Jul/01/2018 17:05 (Moscow time).

Авторы раунда — Ильдар 300iq Гайнуллин, Григорий vintage_Vlad_Makeev Резников, Михаил MikeMirzayanov Мирзаянов, и я, cdkrot.

Большое спасибо Shiqing cyand1317 Lyu, Андрею GreenGrape Райскому, Ивану isaf27 Сафонову, Алексею Aleks5d Упирвицкому за тестирование раунда. Михаилу MikeMirzayanov Мирзаянову и Николаю KAN Калинину за помощь с подготовкой раунда.

А также Михаилу MikeMirzayanov Мирзаянову за системы codeforces и polygon.

Как обычно, в раунде будет 5 задач на 2 часа. Надеюсь, что вам понравятся задачи, и желаю удачи!

Разбаловка будет опубликована незадолго перед раундом.

UPD: Разбаловка выглядит следующим образом:

Div1: 500 1250 1500 2500 3000

Div2: 500 1000 1250 2000 2500

Возможно, вы также хотите обратить внимание на этот пост со стримом-обсуждением после контеста.

UPD2: Опубликован разбор

UPD3: Поздравляем победителей!

Div1:

  1. TLE
  2. ksun48
  3. fateice
  4. Swistakk
  5. Um_nik
  6. Petr
  7. V--o_o--V
  8. consecutivelimit
  9. LHiC
  10. uwi

Div2:

  1. kirisamejin
  2. liu_runda
  3. AntiLeaf
  4. TheFallenOne
  5. haj_lemon
  6. st-Firdavs
  7. traxex
  8. paladin
  9. kmyiu
  10. Maxim
  • Проголосовать: нравится
  • +274
  • Проголосовать: не нравится

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

Пересекается с матчем Сраптак М — Авангард (Курск)

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

Wow you've mentioned mike three times.

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

Почему было не провести раунд на 2 часа позже, чтобы все успели насладиться игрой лучшей сборной мира, а потом и задачи порешать?

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

Are we allowed to code in Q#?

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

5 problems in both divisions?

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

Cool, we get to see 5 minutes of Spain-Russia.

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

Finally Green GreenGrape!

I see what you have done with HTML ( ͡° ͜ʖ ͡°)

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

hope this contest has a lot of hacking stuff...:)

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

Upvote if you think the main characters of this contest should be Messi and Ronaldo.

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

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

Hope the statement be as short as the announcement XD.

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

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

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

Is It Rated?

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

Hope the statements is as short as the blog.

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

remember, I'll hack you!

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

Many Russians and spanish won't participate in this round..#world_cup

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

?detaR tI sI

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

I would like to know from the community that is it fair that a re-submission which has the passed pretest should be considered for deducting points in a contest?

I had submitted one solution which i didn't think would pass the pretests so i re submitted with minor change before the result of first one but both the submissions passed the pretests, so i would like to know WHY or WHY NOT points should be deducted for the second correct re submission?

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

MathForces

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

Is it ridiculous to have two counting problems in one round?

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

Not the kind of problems that I hoped for

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

I finished A~D all within 31ms and 12KB...What a strange contest!

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

omg just don't tell me that this actually solves div1B/div2D

vector<int> a = {0, 4, 10, 20, 35, 56, 83, 116, 155, 198, 244, 292, 341};
if (n < a.size())
    return a[n];
else
    return a[12] + 49 * (n - 12);
»
8 лет назад, скрыть # |
 
Проголосовать: нравится +18 Проголосовать: не нравится

На чем ломали A?

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

    Многие писали что-то в духе cout << min(cnt * y, (cnt - 1) * x + y); (cnt — количество блоков из нулей)

    Соответственно, на тесте, где cnt = 0 и x > y, такое решение выведет отрицательное число.

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

Why are there 2 combinatorics problems in this round, and why can B be solved with brute force observations?

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

1908 solved C, 344 solved D

The problems were not measured correctly

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

cheating ??

Stecher

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

div2E/div1C was a hard one, IMO...

could somebody give a hint on its solution, please?

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

Is there any way to hack consistently with regard to a segfault? There were a few times that I saw people accessing, say, s[n] when s only had n elements allocated to it, which should cause a segfault, but because of the magic of operating systems, segfaults only happen sometimes. These people will probably fail during systests, but I can't reliably hack because even if I submit a hack, the OS might not complain about a segfault and I'll get an unsuccessful hack. Is there any way around this or should I just not try to induce a segfault in a hack?

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

    I also faced this issue. I think there is no way to hack such solution surely. I hope MikeMirzayanov may do something to handle the issue, for example, some cases may be added so that such solution don't get accepted. But by this way solution may not even pass the pretests and thus no way to hack — I am not sure though.

    By the way, you may create a blog post regarding this.

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

nice algorithmic problems :p

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

Streaming now! Check out twitch.tv/ttocs45 for problem discussion.

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

Биткоины звучат круче чем берубли или бердоллары:)

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

too much math

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

So much counting problem :(

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

I bet a lot people tried oeis for div2D/div1B

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

I misread problem A, and I thought it was asking about a split in which the sums are equal (instead of unequal). So, I asked them about the second sample why there is no answer for such case and their response was:  They said "that one is also OK" and the correct answer should be -1, that made me confused for a lot of time at the beginning of the contest.

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

constraints of div2 B should be bigger

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

Can anyone prove the function of problem div2_D / div1_B ? Please help me.

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

What's wrong with Errichto?

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

When will we get data structures, graphs, etc , and not only math problems?

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

It's luck to compete in two math forces round 492 and 493... Lol, should run away from it for a short period.

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

Contest was completely Fine, But I honestly think codeforces should limit the math/geometry based problems to atmost 1..cause This is codeForces not MathForces

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

Any reason why system testing has not started?

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

Always a common scene after 20-30 minutes it will be started judging. What is the problem? -->After two hours contest, contestant are waited more than two hours before got rating. Hopefully, it will be fixed soon.

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

Поздравляю всех Россиян с победой!!!

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

ЛЕГЧАЙШАЯ ДЛЯ РОССИИ

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

Round was ended earlier than Russia vs Spain. What a surprise.

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

In div1.B, we should count how many difference a+5*b+10*c+50*d, where a+b+c+d == n.

We can notice that

if b == 1 && c == 5, a == 5 && d == 1, then a+50*d == 5*b+10*c && b+c == a+d;

if b == 9 , a == 5 && c == 4, then a+10*c == 5*b && b == a+c;

if c == 9 , b == 8 && d == 1, then 5*b+50*d == 10*c && c == b+d;

if we avoid all (b >= 1 && c >= 5) || (b >= 9) || (c >= 9), we can get the answer.

the answer is C(n+3, 3) — C(n-3, 3) — 2 * calc(n-6) + calc(n-7) + calc(n-11) = 49*n-247

sorry for my poor English :D

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

    if b == 1 && c == 5, a == 5 && d == 1, then a+50*d == 5*b+10*c && b+c == a+d;

    if b == 9 , a == 5 && c == 4, then a+10*c == 5*b && b == a+c;

    if c == 9 , b == 8 && d == 1, then 5*b+50*d == 10*c && c == b+d;

    How did you find these relations? Did you use any specific technique?

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

For Russian Celebration, Mike should increase all of our rating :3 :3 (Rus Vs Spa fact)

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

Can you explain 7s TL in D ?

39833354 — O(n2k)
39838295 — O(nk2)

It was hard to distinguish?

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

Hackforces!!

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

Does anyone like me WA on A,B,C and AC D :(

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

Why are there always math questions whenever greengrape is associated with any contest, be it testing or writing? Because of her, i am always fucked in the contests. My cumulative decrease in rating is now 400 in contests related to that idiot greengrape.

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

What's the test 16 of Div2/C?

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

I hope you enjoyed the contest!

The editorial was published! Check it over there

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

The following submission for problem D in Python3 gives wrong answer:

39842076

Whereas the same submission in Python2 passed:

39846023

Why would this happen? Can somebody look into this?

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

    I am not sure, but maybe because of division? In Python 2, "a / b" is integer division if a and b are both integers, but in Python 3 it instead performs "actual division" (i. e. returning a fraction without rounding).

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

Really, that was my fix for C between pre-tests and AC...

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

Your crafting.oj.uz ratings are updated!

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

I was looking forward to rating changes in comparatively easier Div 3 contests coming up soon. Alas!!

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

I don't know if this is the right place to comment about this or will make things better or worse, but I am commenting anyway, so I can say to myself that I at least tried. Codeforce has deemed that my solution to today's contest's div2 D has too many similarities with some other accounts and hence ruled me out of this competition, of course due to my own mistakes.

I just want to clarify that (no matter the result of it): I thought up, figured out and coded the solution of that problem all by myself and did not take any help from anybody or any other resources. Initially, I wrote a bruteforce code but it took up a lot of time when it was running for n=15. but n=11, 12, 13 and 14 were enough for me to figure out my solution based on pattern. my codeblocks was still busy with my bruteforce code so, I used ideone (and stupidly, it was public) to check my code for errors. and the rest is as it is now.

But of course, words are just words. I don't have that hard evidence that it was my own code. But I do have some points to show. Do note that it's not contest rating or such I am worried about, I am not blaming anyone other than me or asking for any sort of rating recovery. It's the reputation and shame that matters more to me. Right now, people who know me and friends can look at my profile and think I cheated, and that really hurts. If only at least that could be solved, it would mean the most to me. Without further ado, I will present the points which -might- prove that I didn't cheat at least.

  • This is my submission to div2 D. Note the first few lines please, the define declarations.
  • Now, if you please look at most of my previous submissions (not just of this contest), you will realize that I am using same lines of codes for a long long time.
  • Let's look at the codes of some people with whom I am accused of cheating. vbbvaddd79506 is the first such username. This is his submission of div2 C. This is the code of div2 D he copy pasted from when I was using ideone. See how the first few lines of codes (the define declarations) differ from his previous submissions? I am sure it's also true for all other users with whom I was accused of cheating too.

This should clear up that despite my mistake of using ideone in public mode, I at least didn't cheat and solved the problem myself. And I will make sure that I will never make such a mistake again. But the consequence of this naive mistake, the shame, that's what's killing me. If only there was a remedy to at least clear my name... :(

I am also adding my bruteforce code from which I found the pattern, not that it's any kind of proof or whatsoever.

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

Is it normal to show top 10 instead of top 5? :)

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

duliu math problems

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

can anyone explain me div2 B cutting problems.

if i cut at a position So i get two sections,So does the both section need to have same the numbers of odd number and even number.

like :

6 4

1 2 4 5 7 7 what's the output of this one?

1 2 | 4 5 | 7 7 is it possible?

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

Did the author intend any pun when writing problem B statement by writing 'cut "the rope"?

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

It helps me a lot, I hope to get better and better.