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

Автор DimmyT, 4 года назад, По-русски

Ас-саляму алейкум, Codeforces! (Мир вам, Codeforces!)

Мы рады пригласить вас на Codeforces Round 673 (Div. 1) и Codeforces Round 673 (Div. 2), который пройдет в 27.09.2020 18:05 (Московское время) (Обратите внимание, что время позже, чем обычно). Раунд будет рейтинговым для обоих дивизионов. Участникам обоих дивизионов будет предложено шесть задач и два часа на их решение.

Задачи были придуманы nkamzabek, bthero и мною DimmyT.

Мы очень благодарны следующим людям, которые помогли в подготовке раунда:

Это наш первый раунд, надеемся, что задачи будут интересными и что раунд пройдет без проблем

Разбалловка:

Div2: 500-1000-1500-2000-2500-3000

Div1: 500-1000-1250-2000-2250-2750

Всем удачи и высокого рейтинга!!!

UPD: идеи на задачи

UPD: Разбор

Поздравляю всех, контест прошел без проблем!!!

Div1:

  1. tourist

  2. ksun48

  3. maroonrk

  4. 300iq

  5. Aidos

Div2:

  1. poorboy

  2. kaisel

  3. immortalhunt

  4. hieu_2004

  5. _dg_

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

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

Hope that your first round as a setter will be flawless.Good luck DimmyT.

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

As a setter, give me a contribution please)

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

Thanks for contest DimmyT). Hope your first contest goes well.

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

Неужели это первый казахский контест?)

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

How was this blog made 7 weeks ago?

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

DimmyT Will I reach you? I hope I can reach you...

Reference: See my profile picture and the problem setter's. Also, I do want to reach Master. :3

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

clash with CodeAgon 2020 (Codenation coding challenge) https://www.interviewbit.com/contest/codeagon-2020/

just saying :)

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

Good luck to everyone and thanks the authors for the contest!

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

DimmyT Please BOLD or HIGHLIGHT the unusual contest time .

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

Wa alaykumu as-salam

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

Wa alaykumu as-salam

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

Wa alaykumu s-salam DimmyT

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

Oalaikumus salam

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

lovely to see salam... Walaikumussalam

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

Oya-laikumus salam DimmyT,, hope the Div-2 round will be very interesting ❤

»
4 года назад, # |
  Проголосовать: нравится +54 Проголосовать: не нравится
Fun fact
Another fun fact
Conclusion
»
4 года назад, # |
  Проголосовать: нравится -28 Проголосовать: не нравится

Wa alaikum us salam. [user:DimmyT]Very very good wishes for your first round.

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

Good to see a round from the Borat country_****_

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

алга казахстан

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

Why have you tagged this round as cf666 ?

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

A best of luck to all from this baby panda :)

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

what is the division rule in parallel div1/div2 round, because i am seeing that some experts are registered in div1 and some master are also registered in div2 too so am i little bit confused can anyone explain

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

Такие лапочки ребята! Я в шоке! UwU

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

Hope that I will become specialist after this round.

»
4 года назад, # |
  Проголосовать: нравится -41 Проголосовать: не нравится
Spoiler
  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +9 Проголосовать: не нравится

    For those too lazy to click 15 times it says Good luck and high rating!!1!

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

this contest time is very good for me.

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

Walaikum-assalam...waiting for your first and hopefully nice round.and also hope i will reach my top rating ...

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

waiting for score distribution

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

Wa alaykumu s-salam!

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

Good luck to everyone!

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

Will score distribution publish after the contest?????

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

Hope for a better Rating for me and everybody :) keep practicing!

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

Less than 90 minutes until the round starts.. no score distribution yet?

UPD 1: Less than 60 minutes, no score distribution yet

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

Алга Казахстан

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

As a contestant, I would like a cake.

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

thanks again to MikeMirzayanov to for creating, developing, and maintaining the best websise of algorithmic problem ever. and my congratulation to you, DimmyT, for managing a team to creating contest and I hope that will be one of your best experience.

thanks again for your efforts.

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

DimmyT how many shared problems will be?

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

"UPD: problem ideas"

got trolled by this in the update.

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

Original Song is so inspiring!!!

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

This is my first time I solved a div2 probelem during a contest. Yeah!!!!!

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

очередной quick-typeforces

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

hello all ,can someone explain me , why my rank dropped ,the moment i submit the same code for the same problem after sometime tho it was already passing the pretests successfully?

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

I'm really disappointed I took my time thinking in C but couldn't see the solution :/

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

    What do you mean by "see", do you mean "without getting the solution"?

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

    What was the point to write it in the comments? You wanted to show everybody how stupid you are? Well, mission accomplished dumb ass

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

      if someone couldn't figure out the solution of some problem that doesn't mean he's stupid most of the times I can solve C
      what's the point of your comment? to show me that you're a piece of shit ? Well, mission accomplished dumb ass

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

        Bruh, why do you still green-piece-of-shit if you've already participated in 200 rated rounds

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

          I'll come back to cyan soon don't worry no wonder why your contribution is -7 because you're a jerk

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

            at least, I participated in less than 150 rounds, and I have higher rating than you, and I don't cry because of unsolved problem

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

              there are others higher than you so what's the point ? does that give you permission to talk down to others should tourist come and write to you orange-piece-of-shit and I'm not crying it's just a comment that expresses what I feel WTH do you want from me

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

                OK, I think guys, that have higher rating then I and had participated in less rounds than I are really cool. I want you to delete all your useless comments, because people here don't give a fuck about how you were thinking in div2 C and didn't solve it. You have just to work hard and don't write this shit in comments.

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

                  I don't think I should take advice on what I should I write from -7 contribution asshole make your contribution more that 100 then speak

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

                  Oh yeah, if u think that contribution shows the level of your IQ, than u r really stupid

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

                  Can you complete a sentence without saying bad words?

                  There are many of codeforces users who have not yet completed the age of 13 and you are affecting them with your speech.

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

                  well it shows how good your comments are and your comments sucks
                  so you think tourist is cool well you're right he is cool but does he talk like you ? No he never told someone you're bad because he isn't a piece of shit like you

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

                  impermanence how old are you lmao.

                  8?

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

                  OK

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

                  Sure

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

            And I really don't give a fuck about my contribution:)

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

            In Ukraine we say:"Не кажи гоп, поки не перестрибнеш", and i think it's beautiful.

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

              In Ukraine "Kyivstar" bans Codeforces, and i think it's beautiful.

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

        If you can't solve problem, it is your fail. Your comment was stupid and useless. You have better go and upgrade your skill.

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

        Really guy, why do you write this comment? What are you waiting for? You simply write shit into comments, and because of you and guys like you comments section have a lot of useless shit instead of really important comments.

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

          so all of the other comments are full of useful information ? let's see one of your comments
          you should create problems on mathforces, not codeforces. well that was really great comment ... but it's better if I didn't read it

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

            Don't react to these negative messages. These guys are just provoking you.

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

              You're right I won't next time they're just trolling

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

nice score, awesome D...

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

That was stressful, wow.

In Div1C, was it intended to disallow $$$O(n \log n \log C)$$$ solutions? If so, it would've been better to make it explicit with setting $$$n = 10^6$$$ or something.

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

    I was also stuck at this the whole time.

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

    my o(nlogc) get tle

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

    My $$$O(n log C)$$$ solution using unordered_map TLE for a few times.

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

    Agreed, time limit was definitely not fun, I only got AB because of starting C too late and not giving myself enough time to optimise at the end :[

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

    My solution worked pretty fast. Also, the intended solution was $$$O(n log C)$$$. My solution: 94020968.

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

      Not allowed to view the requested page :/

      I'm sure the intended solution was $$$O(n \log C)$$$, but in the case of borderline complexities like $$$O(n \log n \log C)$$$ it would be nicer to have time limits and constraints that make it clear whether it passes or not. Currently it seemed clear that $$$O(n \log n \log C)$$$ would pass, but in the end I found out that it doesn't.

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

    Should ideas rather than optimizations.

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

      The intended solution should pass pretty easily

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

        my O(nlogc) solution took 1.8s(I noticed this 10minutes after passing pretests) in pretests.Since it was very close I didn't want to take risk.I had to constant optimize it and resubmit losing a lot of points in the process.also got mle once just for using long long instead of int.imo in trie problems ml should be higher.like 1-2 gb

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

          My solution uses pretty small amount of memory. My implemention with trie pass easily too.

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

    Yes my $$$O(n \; log \; n \; log \; C)$$$ using mergeSort failed but passed in 2386 ms in mashup :(

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

What is the point of eliminating $$$O(n log^2n)$$$ solution in div1C?

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

why is my contribution -1? what did I do?

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

    You posted this comment without formatting code and without hiding code in a spoiler tag.

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

      Okay. I didn't know that. I am new. How can I now make my contribution non-negative?

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

        My suggestion (this goes out to everyone who has negative contribution and doesn't understand why): lurk the blogs and comments here to get a feeling about which comments and blogs are welcome. And only once you understand, start commenting yourself.

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

WA 6 times.

Div2D pretest 2 is literally mocking at me.

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

And the fastest editorial publisher award goes to DimmyT

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

Can someone please explain the wrong strategy in my d2c ans : Store the indices for each value and then find the minimum value of k for which this fits by binary search. and then manipulate the answer array with left to right traversal.

Regarding binary search I got a pattern that for each indices in kth supposed iteration its supposed count is min(i, k, n — i + 1, n — k + 1) then I binary search on the value of k.

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

submit F in last 5 seconds and find my output is following:

YES
1 1 1 1
1 1 1 3
4 2 3 1
RDLL
DRDD
ULUU
NO

instead of

YES
1 1 1 1
1 1 1 3
4 2 3 1
R D L L
D R D D
U L U U
NO

Hope my solution is wrong XD

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

Cornercase for Div2D: it is possible that we can't subtract anything from such ai that ai<i and this ai is more than sum(a)/n, but we can add to it i-(ai%i) from a0, so solution exists in that case

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

    Also, I've been struck for a long time thinking what if i-(ai%i) > a1. But since at any point say we are at index i, a1 must contain atleast i-1 (as initially all elements >=1). And i-(ai%i) cannot be greater than i-1(since i doesn't divide ai). Hence, the non-negative condition holds. Nice problem.

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

Div1B : The initial value of a_i IS NOT 0

haha....

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

got OK on D with 1466 ms with sets in $$$O(nlog^2n)$$$

how to solve it properly?

UPD: resubmit of the same code in upsolving results to 1231 ms. got "lucky".

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

Tonight may be the second time I turn blue. My performance tonight is not good. After finishing the first three questions, I looked at D and didn't have any thoughts, and then I looked at E and I didn't even think. Finally, I came up with an algorithm for the number of operations for question D of 2*n, and submitted it at 01:52. But returning to the wrong answer, I reviewed the code and found a bug, but there is no time to change it. If you give me half an hour more, maybe I can pass it. I also want to be a candidate master, but I know this is not realistic. The realistic goal is to stay blue for the next few rounds. It's incomparable to a god who can turn yellow or red in a few games, and I am satisfied with that. I don’t have any acm and oi experience. I’ve been in contact with codeforces for four months. I can’t even solve div2a from the beginning (yes, I tried div2a for one round, but after trying for more than an hour, I still didn’t get ac. There was no way, I had to look at other people's code, and finally passed this question.), This is my first experience of doing the question in codeforces. By now, I finally solved some problems. Having said that, I hope everyone has good luck and a good rating, and most importantly, make progress on codeforces.

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

    You can do it!!! Before I finally became a Candidate, I almost fell to Specialist.

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

      What is wrong in the solution of D. (Div 2)

      Code

      UPD: Found my bug. Thank You all.

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

      I must say the problems were very good!

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

      This contest is great, thank you for your encouragement.

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

please help why my logic of two sum is not working for problem B My Code

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

    I tried your code with the following input and got the wrong output. In the result, the two groups would be "1 4" and "1 4", and clearly there is a pair that adds up to 5 in each group. The correct partition should be "1 1" and "4 4"

    Input:
    1
    4 5
    1 4 4 1
    Output:
    1 0 1 0
    

    You would want to be consistent in the partition of numbers — by which I mean if one 4 is given to group A for one time, you'll also want it to be given to group A when it appear for the second time. The way I did it is to:

    for(ll i=0; i<n; ++i) {
                if (umap[k-nums[i]]>0) {
                    c.push_back (i);
                    //delete this line: umap[k-nums[i]]--;
                } else {
                    umap[nums[i]]++;
                }
    }
    

    and treat "number = half of the unlucky number" as special cases.

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

      Hi, why we need to place in same group.. can you please explain me why we need to be consistent in partitioning.

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

        If you have "3 5 5 3 3 5" and the unlucky number is 8, and if you put 3 into group A the first time and into group B the second and the third, it would be like:

        Group A: 3 5 5
        Group B: 5 3 3
        

        But in this case both of the group contain two pairs of 3-and-5, which adds up to 8.

        A better solution is to partition this into:

        Group A: 3 3 3
        Group B: 5 5 5
        

        In this case no 3 and 5 are in one group.

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

****i think you should make strong pretests..**** btw good questions great-

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

    yes , you are right , pretests are soo weak

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

      You being hacked does not mean pretests were weak. It just means that you sent an incorrect code

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

        my answer had not been hacked , it passed pretests but wrong answer after system tetsing, so please have correct knowledge before saying something

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

what wrong with my solution for div2Bi can't find it but it got FST[submission:93982376]

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

can someone help me find why it FST in div2b[submission:93982376] thanks

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

    One of the problems I see is you seemingly have uninitialized c when k%2 == 1

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

    On line 39:

    38   rep(i,0,n){
    39   	if(a[i]>=k){
    40           cout<<0<<" ";
    

    if you put "if(a[i]>=k)" instead of "if(a[i]>k)",then both all numbers bigger than k and k s themselves are automatically labelled 0.

    However, the numbers could also contain 0, and thus 0 and k are both labelled 0, according to your codes.

    Best luck next time, Kanshan.

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

What about div-2 B

can some one give me some idea for that

Thanks in advance

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

    Try to partition the numbers into two sets in such a way that for a number $$$x$$$, $$$x$$$ and $$$T - x$$$ won't belong to the same set

    If both sets contain $$$T - x$$$ go to the set with the minimum count of $$$T - x$$$.

    Submission: Link

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

How long will rating be updated after the game?

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

    1 day I think, after the Hacking period

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

      This was a div2/div1 round. So, no hacking period.

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

        Wait, hacks are supposed to be done during contest...? I never did any hacks before so I thought it's after, sorry for that. But the scores are indeed updated one day after the contest, right.

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

          No, ratings usually update about an hour, or two after a div1/2 contest. By the way, FYI hacks will give you points in div1/2 rounds.

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

кто-нибудь взломайте это решение, мне рейтинга не хватает на взлом
https://codeforces.com/contest/1417/submission/93983339

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

    На самом деле, мы специально сделали так что бы и такое решение проходило

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

Congrats Ashishgup

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

Thank you DimmyT, this contest helped me to get Specialist