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

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

Привет!

В субботу 23 июня в 18:35 (Московское время) начнется Codeforces Round #491 (Div.2). Раунд будет рейтинговым для участников с рейтингом менее 2100, остальные участники могут решать задачи вне конкурса.

Раунд во многом пересекается с задачами олимпиады по программированию ННГУ 2018 года. Если вы принимали участие в олимпиаде или дорешивали задачи, просьба не участвовать в раунде.

В задачах раунда вам нужно будет помочь студенту Васе справиться с трудностями, вызванными окончанием учебного года. Всего будет предложено 6 задач и 2 часа на их решение. Если же вы решите все задачи за 25 минут, то успеете посмотреть второй тайм матча Южная Корея — Мексика на чемпионате мира FIFA.

Разбалловка немного нестандартная: 500-1000-1250-1500-2000-2750

Выражаю максимальную благодарность Михаилу MikeMirzayanov Мирзаянову за всем известные платформы; Николаю KAN Калинину — за помощь в подготовке задач и координацию раунда; Михаилу mike_live Кривоносову, Алексею Livace Илюхову, Никите FalseMirror Босову, Андрею GreenGrape Райскому и Алексею Aleks5d Упирвицкому — за тестирование задач; Арсению arsor Сорокину — за перевод условий. А всем участникам желаю удачи на раунде!

UPD: Раунд завершен, всем спасибо за участие!

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

Div. 1:

  1. nuip
  2. krijgertje
  3. qoo2p5
  4. hohomu
  5. neal

Div. 2:

  1. King — решил все задачи, отличный результат!
  2. Daniar
  3. Saidjamol
  4. shoemakerjo
  5. Toki_Time-Tinker

UPD: Опубликован разбор задач

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

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

Автокомментарий: текст был обновлен пользователем ashmelev (предыдущая версия, новая версия, сравнить).

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

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

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

Why its not in the home page yet !!!!

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

Второй тайм матча Южная Корея — Мексика. Появилась еще одна мотивация сдать все задачи быстро.

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

!

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

Спасибо за контест в день Алых Парусов ^_^

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

Can't you push the contest start just 10 minutes? Give us Mexicans and Koreans a chance to watch at least the full first half. Finishing in 25 minutes is a little impossible btw.

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

will-know platforms??

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

statemnts ???

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

Кстати, если ставить контесты по утрам или ночам, они не будут пересекаться с матчами

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

Short task statement == Watch the world cup earlier

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

Round.id() % 100 == Contest.id() % 100

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

Solving all problems in 25 minutes (me) VS Scoring 1 point in 90 minutes (South Korea)

I'm seriously wondering which one is harder.

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

The RED coders can watch it easily. :)

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

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

CF + Fifa WC = just WOW

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

is it rated?

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

during world cup : contests should start earlier (before matches)

i love this score distribution.

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

If you solve all the problems in 25 minutes you will be able to watch the second half of South Korea — Mexico at the FIFA World Cup.

This is the most interesting sentence I have over seen in Codeforces:)

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

We will reach soon Codeforces #500 !!

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

NNSU Programming Contest 2018 ??

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

Only Gods will solve all 6 problems and watch FIFA. XD

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

pls make extended registration I was not able to register

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

I wonder the time when problem 1000A appears.

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

Oh no! Queue again!

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

i just don't like the problems

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

why F must be such a shit

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

This really feels like Div3 except F which is Div1 :(

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

Worst contest I have ever written actually

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

Problem A is an extremely intelligent problem, it tests creative skills...

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

    did b,c,d,e wa at a twice. please explain A

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

    I understood DP with bitmask solution of problem E. But your solution had less time complexity. Could you please explain your solution?

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

      Sure! I use some sort of knapsack-like DP.

      Let frequency[i] be the number of times digit i appears in the input. I calculated DP[i][j] = in how many ways I can get a number of length j using only digits {i, i+1, ...., 9}.

      There are two cases:

      1. frequency[i] = 0. In this case, we obviously can't use digit i. So DP[i][j] = DP[i + 1][j].
      2. frequency[i] > 0. Here, I'm forced to use digit i at least once. Let's iterate the number of times I'll actually want to use digit i. I iterate this with a variable k which goes from 1 to frequency[i]. Now, I want to obtain length j, and exactly k digits are forced to be equal to i. We only have to decide in which positions will be those k digits. It's not hard to see we have j available positions and we have to choose k of them, so the answer is Comb(j, k), a binomial coefficient. We're left with j-k positios to fill using digits {i+1, i+2, ...., 9}.

      So we have DP[i][j] += DP[i + 1][j — k] * Comb(j, k).

      There is a special case when i = 0. Then, I won't be able to put a 0 on the first positions, so I'm only left with j — 1 positions to choose from.

      So DP[0][j] += DP[1][j — k] * Comb(j — 1, k).

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

Is it a better div3 contest rather than the previous two?

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

Is it a div3 contest rather than the previous 2 ?

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

2k accepted solutions for a D-problem during the contest, first time when I see something like this

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

Contest does not seem like div 2..!!

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

What is Testcase 7 for E?

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

one of the best rounds I tried thanks ashmelev

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

Codeforces Round #491 (Div.3)

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

How to solve C?

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

Who else felt that the author was talking about Messi in problem E :D ??

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

What a joke of a contest ! D is not a 1500 problem. Can someone prove that C lies within time bounds using a binary search ?

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

    Binary search is log. Check in bs: if at some step there are k candies, at next step it will be less then 0.9k. So check takes <= log(n) base 10/9 steps. Overall complexity is O(log^2).

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

    On day d, Vasya will have ((9/10)^{d-1})*n — k(1 + (9/10) + (9/10)^2 ... d times) = ((9/10)^{d-1})*n — 10*k(1 — (9/10)^d) candies. Make this 0 and solve for d, we see that d is logarithmic in n. So we can use binary search.

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

    Even if we assume that only 10% candies will be eaten each day(90% will be left next day), and Vasya does not eat any candy on any day, (10/9)^r * n <= 1 ( Assuming after r days candies left<=1 ) we need to find r, put n = 10^18(for worst case), you get maximum days (r = no. of days candies will last), which is <=500. So in binary search, this bruteforce takes <= 500 computations, so Overall it takes c*500*log(10^18) computations using binary search on k..

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

    Suppose k was 0 (it's obviously the worst case).

    Each day, we have n decreasing by 10%, i.e, it becomes . So after m days, it's . For n = 1018, something like m = 400 will bring this value down to below 10 — actually something a bit less, like m = 380 works.

    Having a higher k will simple accelerate this.

    Final complexity is O(log(1018) * 380), which isn't really a problem.

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

    in every iteration either

    which converges giving

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

Test 7 for problem E??

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

does D need dp ?

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

Float operations....we meet again -_-

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

What is test 9 of problem F?

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

Last Div3 was harder than this.

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

DP round :o

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

What's the problem-C's idea? Just hate these kind of mathematical questions...

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

One of the worst contests I have seen. Maybe it is time for codeforces team to consult atcoder coordinators about how to arrange quality contests.

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

I feel so bad. Problems which have long code-time make me crazy (I am talking about problem E ToT). Problem E has not very much brainstorm, just long code ToT

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

What is test 9 of problem C?

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

can anyone tell me whats wrong with my solution of problem C. i was getting wa on pretest 6. link to my solution — http://mirror.codeforces.com/contest/991/submission/39576641

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

This is just sad. I used to participate in CF rounds to learn something new, but the past few contests have focused way too much on just implementation. Disappointed! :/

Secondly, this nowhere looks like a Div2 standard contest.

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

Is there any hack against my solution for problem D, can someone please confirm? Code

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

Does any one think that this contest had difficulty of div 3 and previous div 3 had difficulty of div 2?

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

Completed E with 1 min to go and then remembered that I hadn't handled numbers beginning with 0.

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

How to prove monotonicity in problem C.I just tried, and I cannot figure out a proof.

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

    Let's assume that K is our optimal answer.

    We can prove that K+1 would hold good to get more than N/2 candies.
    Similarly, we can prove that 1,2,....,K-1 won't hold good. So it's like shifted unit step function (considering >=0 part only) if you observe carefully. And I guess, we can run binary search to find the starting point of that step.

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

    The amount of chocolates he collected at each turn monotonically decreases.Now, when vasya increases the value of k the rate of vasya collecting chocolates at each turn further reduces. Finally, total chocolates collected by petya in the end for a given n decreases with increase in k. Thus, chocolates collected by Vasya is also monotonic.This was my way to convince myself with a logical inference.

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

    I think it helps to look at it from Petya's perspective — there's still just one hole which I can't fill in though.

    Suppose, eating k candies daily, Vasya cannot reach , and the process takes d days. The candies Peyta gets are With k - 1, he gets

    Basically, with Vasya eating k - 1 each day, and taking into account that we're flooring, Petya gets at least as many as he does as when Vasya eats k daily. Now, if with k - 1 the process takes  ≤ d days, Vasya has less candies than he first did, so certainly not . If it takes  > d days, Petya has at least as many on each day as he had previously, so he ends up with at least as many as he had previously, which means Vasya can't have anyway.

    The only irregularity here is the last 9 candies — and even that disappears once d is high enough ( ≥ 9). Probably, that case can be worked out separately or something. Or maybe my logic can be modified a bit to take care of that, I'm just not seeing it.

    Edit: Small mistake in the numbers, fixed now.

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

can someone explain to me why 80 cannot be the number of the bus? 2028 has '8' and '0' both. I guess I have misunderstood the whole thing ._.

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

What could be the pretest 9 of problem D?

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

Task C, WA 8 anyone?

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

How to solve F ? i made an assumption that the optimal is either 1- take the number as it is 2- take a set of divisors and multiply them and for each number i used DP to find the minimum length to represent it, either : 1- its length 2- multiplication of prime factors 3- x*10^p + .....

However seems am missing sth or maybe buggy code :3

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

It was the worst round I ever took part in. Each problem can be solved by a monkey without creative thinking. To solve everything, it was necessary to have hands for realization.There was none idea problem. Also problem D should not be solved by 65% of participants.

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

maybe, problem D needs a illustration i think:)

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

Instead of ranting at the level or quality of questions, spare some time to appreciate the efforts of the authors for conducting it. Weird how only handful of guys got all of them correct but almost everyone is lashing out here about the quality of problems.

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

anyone else not satisfied with the difficulty of the round ?

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

Can someone explain how to solve E ?

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

    DP with bitmasks

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

    First, you can easily store the number of appearance of every digit.

    Let's calculate through every case that, in each, the number of used digit of each value (from 0 to 9) is either zero if there isn't any of such at first, or any positive value not higher than its initial appearance count. This could be implemented via backtracking.

    To calculate the value for each case, you need to know the number of distinct permutations and distinct permutations with leading zero(s).

    The number of distinct permutations is the factorial of the total digit count, divided by the factorial of each digit's appearance count.

    e.g.: with 2344, the number of permutations is 4! / 1! / 1! / 2! = 12.

    If there is no zeros in the case, obviously there would be no permutations with leading zeros. Otherwise, subtract one from the appearance count of 0, and calculate the number similar to above.

    The result for each case is of course, the number of permutations, subtracted by the number of permutations with leading zero(s).

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

      I did it this way too (hopefully no bugs), but it seems some people did bitmask DP? Can someone explain how that works?

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

        Basic outline is this:-
        Use your mask on digits of the number to determine whether you are picking that digit or not. Check if the masked digits contains all distinct digits that appear or not, and then find all valid permutations for the mask. To avoid recounting, you can hash the digits obtained in the mask and store it.

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

I was super proud that I finished 5 out of 6 problems! Then I took a look at Codeforces predictor and realized that at least 500 other people did as well and that my rating is probably going to go down.

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

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

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

I am not a big fan of criticising contests, but this is a bit too far. None of the problems require any kind of creative problem solving, being obvious applications of the techniques. (side note: "Obvious" is a strong word, but given that more than 600 people solved ABCDE, I think it is used properly). Given that more than 600 people out of 6000 solved ABCDE, this cannot qualify as more than a speed coding contest. For speed coding contests, I recommend the codeforces team not to give div4 problems to a div2 competition and mess our ratings, but to just redirect people to websites like typing.io or codefights.com :)

I do not think there is anything good to say about problem F. It was simply disgusting to say the least.

I do not wish to make anyone feel bad trough my comment, but this is the first time I actually comment anything negative on a contest announcement and I really feel it points out some issues that really have to be fixed.

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

    You are a Candidate Master. So, you may fell all the problems were easy.

    However, when programmers such as me solve C, we feel happy. Then reading comments like this telling that the problems were all very 'obvious' are demotivating :)

    I don't quite think C is obvious. The binary search idea is not obvious to beginners.

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

      I see your point. I clearly do not wish to demotivate anyone with less experience, that is for certain :) The problem is that this was theoretically a contest for all div2 users, but it certainly didn't act like one. A div2 contest should have problems that feel very easy and very hard, but this one certainly didn't have the latter. The only reason problem F had so few AC submissions is that it was a hard implementation problem. This might have been a very good contest for beginners but it definitely wasn't for more experienced users. In the same way that my comment may be sadly demotivating for "younger" competitive coders, this contest was for the good ones. It is horrible to be on #600 when you solved 5/6 problems and see your rating drop badly. Anyway, keep up the good work. One day these problems will seem "obvious" to you too, it is just a matter of experience :)

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

    I agree that problems were a little bit too easy but it is not right to compare this to a type race. I am sure that people did not come with solution in instants after reading the statements, competitive programming is also about proving things fast.

    For example in problem E I was hesitant to just "bruteforce" it, becuase it was not clear what was the complexity to me. But it turns out that the compexity is proportional to nd0*nd1*nd2*...*nd9 where nd0+nd1+...nd9=18 The worst case for this is when 18 is evenly distributed among ndi's, which means that the worst case is proportional to less than 2^10. Which is a cool proof to keep in mind I believe.

    Also if you did not solve problem F how do you say that it is disgusting? It may have a cool proof that you do not know about.

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

Ughhh not a good round -_-

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

I solved E(pretests) using 10 nested for loops, is there any nicer solution?

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

What's the test case 8 for problem E?

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

Автокомментарий: текст был обновлен пользователем ashmelev (предыдущая версия, новая версия, сравнить).

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

Amongst all the criticism of the round, I must say, problem A was hilarious xD ("BugDonalds", "Kilogramm", etc)

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

What's the test case 8 for problem E?

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

Reading the comments, feeling so stupid that I didn't solved C...

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

Люди, почему в задаче С ответ 3. Если Вася будет брать по 2, то счёт будет 35 : 33.
68 — 66 — 60 — 58 — 53 — 51 — 46 — 44 — 40 — 38 — 35 — 33 — 30 — 28 — 26 — 24 — 22 — 20 — 18 — 16 — 15 — 13 — 12 — 10 — 9 — 7 — 5 — 3 — 1 — 0

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

for F, does there exist a case where you need to do a^b * c^d ????

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

What is 8th testcase in problem F? I think it's (x >= 100) ^ y + a ^ b

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

The correct score distribution 750 250 750 125 1500 3000

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

Whoever hacked my solution A will hopefully not live to see tomorrow;)

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

It was one hell of an implementation_based round :O

Though they weren't bad problems IMO

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

The problems are kind of too easy for Div2 (except for F) . Thanks for preparing the contest anyway . It could be a very nice contest if F is easier and let D,E be harder .

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

"If you solve all the problems in 25 minutes you will be able to watch the second half of South Korea — Mexico at the FIFA World Cup."

Well I guess he wasn't joking after all! :D

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

In C, I got WA on 28th case. Please any one will help me, where I did wrong? code

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

The name of problem A is perfect :P

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

Was it really necessary to have 222 System Tests for Problem F?

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

Just wanted to share with you guys a nice way to solve problem E in Python:

http://mirror.codeforces.com/contest/991/submission/39579019

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

This contest was all about speed and accuracy. One WA and you are doomed.

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

I have been judged wrongly regarding question D.Bishwock for test case 16 It is showing that the correct answer is 66 and on runnning my code for the given test case, i am getting the answer as 66, but the status shows "Wrong answer on test 16". Please help!

Here is the link to my submission:

http://mirror.codeforces.com/contest/991/submission/39575936

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

well i don't see why codeforces have BUG/ERROR on judging solutions.here is the link to my solution to 2nd question http://mirror.codeforces.com/contest/991/submission/39564485 and at test case 29 i see no problem at all on getting answer 75. so why is it showing 76 there. i have rechecked it again and again.

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

Never use Python round function ever!!!! It F**KS you bad. Got WA in main tests for 2 questions(B and C) and I have learnt my lesson. Just avoid.

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

I do not get the hate against the setter. It was clearly mentioned it had an intersection with some other contest and the problems might have been taken from there. Even if not, if someone has a problem then I would love to see a contest from them.

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

991C - Эклеры

for Test case #7: Input: 999999972 Jury's answer: 39259423

My exactly same submitted code is giving different output on CodeForces and IdeOne.

CodeForces: 39581649 Output: 39259426

IdeOne: ideone Output: 39259423

ashmelev Can you please check?

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

    It seems that problem is in float type which handles big integers poorly. Probably exact precision is compiler-dependent; anyway I recommend you to avoid non-integer operations in such problems.

    Just replace

    if (k * days + m >= ceil((float)n / 2))
    

    To

    if (k * days + m >= (n + 1) / 2) 
    

    and you will have the correct answer.

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

Will this contest have tutorial?

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

In C, instead of m = (lo + hi) / 2, I wrote m = floor((lo + hi) / 2.0), but my submission gave tle for n = 1000000000000000000. When I tried to find out the reason, I figured out that for lo = 39259424579862569 and hi = 39259424579862576, m came out to be = 39259424579862576. Can anyone explain the reason for this ?

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

Is it just floating point precision issue that :
39569964 got WA and
39589278 got accepted ??

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

In B, I got WA on 18th test case. Can anyone explain what is wrong with my code? I can't understand I got correct answer on other online IDEs. here is my code http://mirror.codeforces.com/contest/991/submission/39556881

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

    Here is the AC version of your code: 39603674. The WA was because of precision issues with floating point numbers, which relates to the way they are stored in the memory. Rather than directly comparing them for being less than 0, it is a good practice to check that they are less than a very small value like 1e-9. Because of the way they are stored, a value that is very very small and can be treated as a 0, might compare greater than 0, so it is better to compare them to a smaller value and not 0. I have even seen some compilers giving warning msgs when I tried to apply comparison operations to floating pt numbers.