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

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

Hi, Codeforces! Happy Valentine's Day. And happy Lunar New Year!

I'm quite honored to invite you to Codeforces Round #462 which will take place at 15:05 MSK on 14 Feb and last for two hours.

The authors are quailty, skywalkert, visitWorld and me. This is our second round here.

The round couldn't have been realized without efforts of KAN and our testers: cyand1317, demon1999. Thanks for your help to the contest. Also, thank MikeMirzayanov for the fantastic Codeforces and Polygon platforms.

The contest will consist of five problems and it is rated for both division contestants.

The background of problems will be about Lunar New Year. (Yes... Not Valentine's Day...)

Hope to see you in the contest! Good luck and have fun, wish you a high rating!

We suggest that those who already have Valentine's Day plans should not participate... You can always upsolve a contest, but there is only one Valentine's Day ;)

The scoring distribution will be announced later.

See you in the contest!

UPD: The scoring distribution is:

div1: 500 — 750 — 1500 — 2250 — 2500

div2: 500 — 1000 — 1500 — 2000 — 2500

UPD2: Congratulations to the winners!

Division 1 :

  1. Um_nik (solved all problems!)
  2. Golovanov399
  3. geniucos
  4. fateice
  5. kriii

Division 2 :

  1. aabdelzaher
  2. WNG
  3. ZYF1023
  4. Kita_The_Dragon
  5. Kuroni

UPD3: The editorial is available now!

Thank you everyone!

Happy Valentine's Day and happy Lunar New Year!

See you next time!

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

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

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

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

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

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

Another Goodbye 2017

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

Thought of not participating at contests for a while but when i saw the nationality of the writers....

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

An interesting fact:

Feb/14/2018 is the 72th anniversary of the first computer ENIAC.

(So I'm going to spend the Valentine's Day with computers, codes and algorithms QAQ)

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

16 contests announced. I've never seen more on the future list, keep it like this codef

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

Good thing there is a contest on Valentine's day! Now I will be solving problems instead of watching porn :)

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

:D

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

I thought for a second to skip the contest and go out with my GF, but I realized that I don't have one (sad emojis ...)

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

I don't think your second warning is necessary -- we are on Codeforces, after all :-)

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

Hope there will not be combinatorics C like in last Tommyr7's last round

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

Finally! Something good on 14 feb. ;)

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

I hope this round will not like that. 1vldm8

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

Ahh,codeforces doing unpaid job for Bajrang dal :| (only indian can understand it)

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

I remember what happened in your last contest mate ;) I hope the mistakes are not repeated this time :P :P

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

Can you call it "Lunar New Year" instead of "Chinese New Year"? This festival is also meaningful for all East Asia countries (Vietnam, Nouth/South Korea, Japan, Taiwan, Hong Kong, ...), not just China. The background of the festival is based on the orbit of the moon (instead of the sun in the normal Julian calendar), then we call it "Lunar New Year". So if you change the phrase, you can support more programmers in Codeforces where there are so many programmers come from the East Asia countries. Thank you.

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

    But the blog poster knows the holiday as "Chinese New Year", and most people know what it is, so I don't see the point. You can call it "Lunar New Year" yourself if you want to.

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

    I'm really sorry about it and I have fixed it now. Thank you for pointing out!

  • »
    »
    6 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +91 Проголосовать: не нравится
    Not safe for political tryhards, especially during New Year
  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +34 Проголосовать: не нравится

    Taiwan and Hong Kong are not countries. Please correct it immediately.

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

    But it originates in china, at all. There is not any problems to call it Chinese New Year. You can see it clearly in the problem background.

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

'

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

Codeforc always gives new things in a new event. I want a girls friend from this contest for current event in this world :D :D :D :D

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

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

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

Again Tommyr7's Round. I like it!

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

That moment when the round organizer cares more about your romance life than competitive programming!!

This level is off the charts! LOL xD

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

I think up votes for this post raised so high cos the writer mentioned the line "We suggest that those who already have Valentine's Day plans should not participate... You can always upsolve a contest, but there is only one Valentine's Day ;)" :P ;LOL

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

Happy Lunar New Year and hope a good contest!

However,dear MikeMirzayanov, why I cannot open the problemset and history contests?

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

Obligatory comment: "Hope the problem statements are as short as the announcement"

0v0

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

lunar new year or.. Chinese new year....We need to stay with parents and extend family..The contest is very suitable for me to avoid doing some new year's work that day:)

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

lol coders having valentines :/

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

Codeforces is my actual girlfriend

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

This contest is my boyfriend so I hope it has a hard D problem

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

For chinese prople, maybe a New Year wish is better than a hign rating Butskhrikidze Happy_New_2024

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

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

Wow, that's fantastic, especially for the time of the contest.

Ahh, although for the Valentine's Day.

Gook luck, everyone. And best wishes for everyone in the New Year!

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

The contest coincides with Slovakia — Russia hockey match...

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

Fifteen words,fifteen words,fifteen words,fifteen words,fifteen words

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

You can easily find a girlfriend, but you can hardly find a cf contest early like this(a contest ends before my bed time).

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

A great contest for single dog(Just a joke) :P

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

Tommyr7 registered this contest... rank++...

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

maybe you can enjoy this round with your girlfriend:D

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

It is clashing with my dinner could you please shift-up contest more later ?)
UPD: Ok, I will eat KFC before contest, no problem )

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

14, 15 and 16th Feb 3 contests back to back.

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

Give me a good reason why I'm still at home on Valentine's day, because I want to attend Codeforces Round #462

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

Looking forward to screencasts of people participating in this contest. Preferably with their dates and a glass of wine.

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

Tommyr7, how to solve div2E?

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

    brute force

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

      Actually, there is a polynomial solution. Note that instead of generating the permutations we can just calculate the determinant of the matrix

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

Came here to make a comment on how I don't have a girlfriend and codeforces contest is one true love.

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

Maha Shivratri >= codeforces round > valentine's day :D

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

Next time, codeforces should do back to back 7 contests, starting from 8 to 14 Feb. So, we can stay motivated. :)

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

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

So, finally something for us(single people) :D

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

Happy Valentine's day, good coding for everyone at the contest Codeforces Round #462 :)

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

Two consecutive valentine day and also codeforces round on both days! :O (2017, 2018)

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

I'm grateful to CodeForces and the contest writers for giving me an opportunity to spend such an unforgettable Valentine's day with my beloved codes and algorithms.

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

Click friend standings and you will find who have no girl friend.

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

Woah, 5 contests in a single week! Awesome!!!

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

Valentines Present by Codeforces.

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

Four authors and all of them have different colours, interesting coincidence))

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

...

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

btw, Valentine's day is every year :D

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

Pyaar ek dhokha hai, rating badha lo yehi mauka hai :P

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

Эх, ну и почему он так рано по времени начинается...

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

Tommy?Tommy!

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

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

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

Are the problems shared between both the rounds? If yes, then Div 2 D would be easy than usual if its worth 750 for Div1 participants. Maybe XD

»
6 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится
TO EVERY PEOPLE IN CODEFORCES:

HAPPY VALENTINE'S DAY

HAPPY CHINESE NEW YEAR!

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

    yay! this is my year according to the chinese calendar, and if I'm not mistaken it is also tourist year since we are both born in 1994

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

WISH YOU ALL HAVE A GOOD TIME IN THE RATED CONTEST!

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

А знаете, почему на раунд 14-го февраля, количество зареганных участников не отличается от обычного числа? Потому что они умеют расставлять приоритеты ;)

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

hack is stuck. Infinitely loading.. Is this happen occurs only for me?

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

In DIV2 B for the first test case can 04 be a valid answer?

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

rating predictor is not working

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

The rating changes from the CF-Predictor Plugin are all 0's. Is this contest rated?

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

Why Div2A is harder than Div2B?

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

First problem was prettier than my girlfriend

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

Negative CF rating. its Valentine's Day cure for not having girlfriend

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

Div1B got me so much time to understand that answer for case p < k is just p, and I have to hardcode it. Damn it.

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

B seems to be standard: "Represent a number in negative base".

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

What's tc 8 in div1 C?

Well, what I did was, taking points from (-21, -21) to (21, 21). Since you can't take all of them, I magnified the grid by 100*100, and took all lattice points there. And for each point, find in what circles it lies in.

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

Happy Hackentine day!

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

Summary in Div2: Codeforces Round #462 (Div.2) a.k.a. Skip C-D and solve E...

(I know, counting all possible cases for E was still a pain, but to me and many others it is still easier than solving C/D).

Anyway, anyone knows about pretest 3 of C? ._.

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

    The subsequence does not have to be contiguous.

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

      What? So that meant I've got it wrong all along...

      Feeling like a dumb right now...

      Thanks for the support anyway...

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

      A non-decreasing subsequence is a sequence of indices p1, p2, ..., pk, such that p1 < p2 < ... < pk and ap1 ≤ ap2 ≤ ... ≤ apk. The length of the subsequence is k.

      Doesn't this imply sequence has to be contiguous?

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

        No. It's only contigous when p(i) = p(i-1) + 1 (with 1 < i <= k).

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

          Okay makes sense. Was solving in the contest thinking it had to be contiguous :(

          Thanks anyway

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

Guys, remember that -x * -x = +x²
Case for problema A:
3 3
-7 1 5
-7 1 5

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

The thing in A is not to use your mind -_- just simulate the process with O(N^3)

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

after months of participating in codeforces contests i ve come to the conclusion that the problems are generally trash with weak pretests and badly translated statements , written by sad weeaboos calling themselves programmers and problem setters so i will leave forever this site here is my passowrd : codeforcesistrash . bye

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

    I made sure you will not participate again, at least with this account :)

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

      by the way can you change the email thx bye again

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

        btw u werent supposed to change the password so that anyone can come visit my account i will send ticket to email noob

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

          You are like a girlfriend that you are breaking up with, and she like "I'm leaving and never will write you again" and then writes you like 9000 messages about how she hates you and how she won't ever write you again. Just leave, omg, nobody gives a shit.

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

I expect a lot of hacks at div1C, I wouldn't like to see more such tasks in future :

  1. Some participants had finished codes

  2. there is a lot of cases + geometry — more 5h ACM style

Other tasks were great to me.

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

in problem D Div 2 are polynomial always exist

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

    Yes, substitute x=-k into the polynomial and you will find that f(x)=q(x)*(-k+k)+p=p. Thus, the coefficients of f(x) are just the base (-k) representation of p, and the coefficients will always be smaller than k since it's base k.

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

Task C div1 / E div2 looks as easy version of one task from Timus.

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

i hated this contest : - unclear statements - a lot of math tasks - a lot of hacks ( which i don't like personally ) - uninteresting tasks

Thank you for trying and please don't do it again

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

Is this true?

For Div2D, notice that although decimal coefficients are allowed for q(x), in no solution will q(x) have a decimal coefficient (??)

Proof: Suppose some coefficient a_k is a decimal number. Then x*a_k will leave a decimal residue, to remove which you will need another decimal coeffcient for q(x). This cycle will never end.

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

    in g(x) all coefficients are integer.

    f(x) = (x + k)(g0x0 + ... + gmxm) + p

    So f0 = kg0 + p;f1 = kg1 + g0;...fm + 1 = gm

    Since fm + 1 must be integer, gm is integer to. And all gi integer.

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

I am surprised to see a lot of C++ submission for B. It seemed that people would rather implementing big number than writing this problem in a different language.

For C, what is the easiest (fastest to implement) method to find intersection of two circles? My idea is to divided the grid into k2 point, and for each point find the set of circles that this point is in (represented by a bitmask), and then the answer is the number of distinct bitmask. It seemed that setting k = 2000 is not enough (higher k will not run in time). So I thought about considering each circle center and points near the intersection of any two circles, and got stuck and the intersection thing.

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

My div2B has been hacked twice,because I regarded the parameter as 34 & 38.I really want to cry.

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

What is the easiest solution for div1 C?

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

    Euler's formula.

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

      What's the value of V and E in Euler's formula if there is only one circle (or two circles not intersecting with each other)?

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

        You can think of a single circle as a vertex with an edge to itself, or 2 vertices with 2 edges between them. In any way, it has V = E.

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

          But if V = E, from R + V - E = 2 we have R = 2. This is correct when there is only 1 circle, but it's incorrect when there are 2 circles not intersecting with each other (R should be 3).

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

            Euler's formula works for connected graphs only.

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

            Euler's formula is V - E + F - C = 1, where V is number of vertices, E is number of edges, F is number of faces, C is number of connected components.

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

Very nice contest for DIV.2! All 5 problems are solvable, and many hacks on A, B. I was late to contest half an hour, but hopefully nobody was checking for hacks on B until that time.

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

Div2E: Can any one сonfirm that there is no such test in pretests?

3
0 0 1 
3 0 1 
6 0 1

Answer should be 4

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

Contest time was too dificult for me to participate, because it was 7:05 AM in my country, toooooo early ;-(, I was in REM 27 at that time. I think contests need to be scheduled in an hour more accesible to all the world.

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

Problem E Div2 / C Div1: Is there any tricky cases other than this one:

3
0 0 5
-3 0 4
0 -4 3

Answer should be 7

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

    For me every case is tricky :D

    For example all three circles have one different common point, or two circles are inside the third one.

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

I lost 1200 points in the last 20 minutes. Maybe i will never be able to participate Div.1. QAQ

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

Anyone else thought the subsequences in div2 C had to be contiguous? I should really start reading statements more carefully...

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

In div2 B for k=39 answer can be 000888888888888888888 is it right?

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

Why cannot I understand Div.2 D(Div.1 B)......

It seems that there isn't any requirement on q(x), but if q(x) has infinite number of coefficients(in other words ), then it looks like there always exists a q(x) whatever f(x) is.

(I took f(x) = x for example and it didn't seem wrong)

So how to explain that? Or am I really wrong?

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

    Polynomial always have limited number of coefficients, that's the point. Polynomial with infinitive number of coeff. calls sequence.

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

      Oh, I see......
      It's likely that I'm misled by the paper of matthew99(in fact it's I that treat polynomial as sequence)
      Thanks a lot.

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

Why if we need 1 loop in problem B, '0' gets WA, and Accepted on pretests with '6'.

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

Div 1 C is the worst problem that can be proposed for a cf round, not only it can be found in various sources but also it only requires to just check some cases instead of the general case. D and E are good on the other side...

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +21 Проголосовать: не нравится
    1. You can write a solution for general case, and I don't think that it is much harder.
    2. What is your problem with case analysis tasks?

    But I definitely agree that copying task from Timus is bad.

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

      When you need to analyse cases in a general problem it's good but when in a particular case I don't think it deserves to be C.

      Also, it isn't only on timus...

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

      This problem is prepared by me and I must apologize that this problem coincide with some problem elsewhere.

      I came up with this idea these days and found it hard to discuss all the cases even if n = 3. So I think it is interesting to leave it as a problem with some hacks, instead of a problem in general case (seems luckily that I haven't did so). However, none of us writers or tester realized that this problem is a special case for an original problem.

      When I saw you passed this problem in 3 mins, I knew things go wrong but can do nothing. But I am still so sorry for that.

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

        Actually you do not need to worry about it :) It is important only for 30-40 users, for all others that is not big deal ( it is true that is the 40 users with highest rating, but still it is not so big disaster ).

        Hope to see more your rounds !

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

          Well... thanks for your approval. But for me it is really an issue, which makes me feel upset instead of delighted for such an interesting(?) task. It seems that my hard works, especially generating some tricky cases by hand, for this problem are in vain.

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

            But... It's harmful for other participants. Because it's just after two very simple problems, a lot of people solved A and B in about twenty or thirty minutes.

            You see, div.1 D is super easy to code, and not difficult to think(just a few sigmas). But when I saw a lot of people passing C in 5 min(even 2), I spent one and half an hour thinking problem C. So I don't think it's good to make this round completely rated. Maybe unrated or semi-rated is a good choice?

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

              As you can see, all of us writers and tester didn't notice that. I must admit that it is also a part of ability to realize the original problem. Making this round unrated or semi-rated will be unfair to those who solved the problem by copy-pasting.

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

            At least you did good job with testcases ! More than 100 solutions got WA at final testing, also div 1 users got chance for hacking something during the contest.

            Still I do not like task :P But I do not think you done so bad job !

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

          Not only for reds, for example 6 people from my country solved it without even knowing the solution (the judge from the link above has public codes). I don't want to blame the author, it's just that codeforces needs testers from different regions.

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

            I wrote first that I do not like task, so I am completely agree with you !

            But I want to say I saw a lot of worse contests in last year than this one :)

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

What do you have on the following test for d1C?

3
-5 0 10
0 0 5
5 0 10
»
6 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Are there anybody who solved D without expanding the formula?

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

It's so funny when people who get high places are the ones who actually manage to quickly copy their sources off of other online judges to submit in this round. No hate.

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

The gift from TeacherQ has receivedQwQ

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

In div2 C, what does it means to reverse the subsegment? flip all 1 to 2 and 2 to 1 or std::reverse(l, r)?

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

I made a typo and still passed pretests for problem A div2

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

not a standard contest at all!!!

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

I have received teacherQ's new year gifts.

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

At contest

![ ]()

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

Codeforces community

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

I enjoyed this contest so much that now I suggest to introduce new contest type. The main goal is to find out, where you saw such problems and then use copy-paste technic to solve them.

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

    I know C today is bad, but come on, other problem is not that terrible.

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

      Ok, you are right, however it doesn't change the fact that even one bad problem can ruin the whole contest, and so the problem C did today.

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

      Div2. A and maybe B were terribble!

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

        if u can't solve a problem it doesn't mean that it's terrible or something ...

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

          and if u solved some problems doesn't mean that they're not terrible:)...

          you can just compare these problems with some other contests to understand my talking...

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

            I don't have any problem with div 2 A or B ... :)

            what was your problem with them which made you say there are terrible ?! ;)

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

              they're ridiculous problems, and both were just implementation problems and have nothing to think about

              getting point from this kind of problems in the contest's needs high precision and chance!

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

                I'm not agree with u,

                A good competitive programmer should be able to solve any kind of problems in contests ;)

                you can't find any comment from top coders like

                tourist or ... that saying some problem is terrible or something else ...

                work on your coding skills and don't complain with others :)

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

                  yes exercising is so important but i don't waste my time to solve A , B problems that have nothing to teach me...

                  any way these problems were terrible ;)

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

    So your solution from Timus is wrong or what? :)

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

    BTW, there already exist contests of that type. SnarkNews [season] Series, for example.

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

I miss when pretests' sole purpose was to decrease the load on the servers during the contest. Now it's just some additional hidden samples.

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

Why is CF-Predictor not working?

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

My friends (and I) with Div2E/Div1C...

Hope that the editorial for this problem will be something genius...

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

      Did anybody manage to pass this using Monte Carlo sampling and DFS?

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

        Probably not. Some of the testcases have an extremely small part, with an area less than 1e-6.

        upd: It's testcase 113, here is the plot --> http://www.wolframalpha.com/input/?i=plot+(x%2B4)%5E2%2B(y%2B2)%5E2%3D81,(x-8)%5E2%2B(y-4)%5E2%3D81,(x%2B10)%5E2%2B(y-10)%5E2%3D100

        http://www.wolframalpha.com/input/?i=plot+(((x%2B4)%5E2%2B(y%2B2)%5E2%3D81,(x-8)%5E2%2B(y-4)%5E2%3D81,(x%2B10)%5E2%2B(y-10)%5E2%3D100),(-0.69%3Cx%3C-0.68,6.36%3Cy%3C6.37))

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

      I'm still not getting it. I know the theorem, but how to set it up with a plot full of circles? (and to top it all off, many curves between two points may be formed)

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

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

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

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

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

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

What is the solution for Div2C?

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

    i solved using dynamic programming.

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

      Could you please explain your solution?

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

        My approach for Div2C:
        It is easy to identify that, all the possible non-decreasing subsequences will be one of the following type:
        1. Starting with 1 and ending with 1
        2. Starting with 1 and ending with 2
        3. Starting with 2 and ending with 2.

        Now for each pair (i, j), we want to find the length of each type of non-decreasing subsequence and we can keep the length of the largest.

        We have two arrays, dp[i][j][k] storing size of largest non-decreasing subsequence of each type [k], in subarray [i...j] and reverse_dp[i][j][k] for reversed [i...j].
        k = 0 stores maximum subsequence of type 1, k = 1 stores maximum subsequence of type 2 and k = 2 stores maximum subsequence of type 3.

        if(arr[j] == 1){  
            dp[i][j][0] = dp[i][j-1][0] + 1;  
            dp[i][j][1] = dp[i][j-1][1];  
            dp[i][j][2] = dp[i][j-1][2];  
        }  
        else{  
            dp[i][j][0] = dp[i][j-1][0];  
            dp[i][j][1] = max(dp[i][j-1][0], dp[i][j-1][1]) + 1;  
            dp[i][j][2] = dp[i][j-1][2] + 1;  
        }  
        

        Similarly we can store data for reverse subarrays.

        Now, we want to find answer when we are reversing subarray [l...r]. We break this array in three parts [0...l - 1], reverse of [l...r], [r + 1...n - 1].

        We can form each type of subsequence by given data.
        Type two subsequence can be formeb by..

        [Type 1] + [Type 1] + [Type 2]

        [Type 1] + [Type 2] + [Type 3]

        [Type 1] + [Type 3] + [Type 3]

        [Type 2] + [Type 3] + [Type 3]

        We can calculate size of these subsequences by using dp and the reverse_dp.
        This is the link to my solution.

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

          [Type1] + [Type2] + [Type2],
          I don't think this would be there. All the possible options can be —
          [Type1] + [Type1] + [Type1]
          [Type1] + [Type1] + [Type2]
          [Type1] + [Type2] + [Type3]
          [Type1] + [Type3] + [Type3]
          [Type2] + [Type3] + [Type3]
          [Type3] + [Type3] + [Type3]

        • »
          »
          »
          »
          »
          6 лет назад, # ^ |
          Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
          int mx = max(dp[0][n-1][0], max(dp[0][n-1][1], dp[0][n-1][2]));
                 for(int i = 0; i < n; i++){
                     for(int j = i; j < n; j++){
                         int a0, a1, a2;
                          if(i == 0) a0 = a1 = a2 = 0;
                          else a0 = dp[0][i-1][0], a1 = dp[0][i-1][1], a2 = dp[0][i-1][2];
          
                          int b0 = rdp[j][i][0], b1 = rdp[j][i][1], b2 = rdp[j][i][2];
          
          
                          int c0, c1, c2;
                          if(j == n-1) c0 = c1 = c2 = 0;
                          else c0 = dp[j+1][n-1][0], c1 = dp[j+1][n-1][1], c2 = dp[j+1][n-1][2];
                          int d0 = a0 + b0 + c0;
                          int d1 = a0 + b0 + c1;
                          d1 = max(d1, a0 + b1 + c2);
                          d1 = max(d1, a0+b2+c2);
                          d1 = max(d1, a1+b2+c2);
                          int d2 = a2 + b2 + c2;
                          mx = max(mx, max(d0, max(d1, d2)));
              }
          }

          @sak3t can you please elaborate this part little more?

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

            In the last for loop, we are taking subarray A[i...j], and we are finding length of largest subsequence of each type in A[0...l - 1], reverse of A[l...r] and A[r + 1...n - 1]
            a0, a1, a2 store length of largest [Type 1] subsequence, [Type 2] subsequence and [Type 3] subsequence respectively for A[0...l - 1].
            Similarly, b0, b1 and b2 store length of each kind of subsequence in reverse of A[l...r].
            Similarly for A[r + 1...n - 1], in c0, c1, c2

            Now we want to calculate maximum length of each type of subsequence in d0, d1, d2 in A[0...l - 1] +  reverse(A[l...r]) + A[r + 1...n - 1].
            We can create [Type 1] and [Type 2] subsequence easily. Look at the explanation above for how to calculate d1, and then we take the maximum of these three length.

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

Can anybody tell me what's wrong with my solution of PROBLEM A

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

    You set initial values for fans and ans too big. Long long in C++ can only hold up to (approx.) +-9e18.

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

      That won't be an issue.

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

        Yeah, the declaration of array size is wrong. But still, the wrong initialization values for those variables I think would lead to Wrong Answer, though.

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

          You're right, there may be integer overflow. But in this case, the code passed.

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

            I see, the constants are implicitly converted to the max/min value of long long.

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

Well...I have to say that it's a round full of FST....

I didn't realized that there was a round here until when the round had run for 30 min..

Then I tried but failed on A,then solved B immediately...

It's not difficult to know how to solve C,but I coded for almost an hour...

Before system test, I was #200+ but became #50 after system test..TAT

I have to say that it's an excellent round.

Finally, Happy Lunar New Year to all the Chinese players!

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

Div.2 D: Anyone here used Bezout polynomial remainder theorem?

P/s: In the last 45 minutes, although I knew we have to build f(-k) = p, but I couldn't implement it :'(

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

gimme privilege to write editorial for Div1C/Div2E: http://codeforces.com/group/qo1icaI3vI/blog/entry/1205?#comment-367474

you can also copy the code and paste exactly from gym with coach mode (sorry div2 poor you)

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

I have to say, this wasn't a nice cf round. It's understandable that pretests in Educational rounds are weak, because those problems are a little bit easier and the main purpose of that kind of rounds is the hacking phase. But making such weak pretests in a normal cf round? Why? I love this kind of contests, but this one is the exception...

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

in question A;

INPUT 3 3 -3 -2 -1 -2 0 1

Output: -2

Answer: 4

why not answer is 6 ? it is the maximum

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

    Tommy hides -3 so the answer is -2 * -2 if Tommy hides another number , Banban will get -2 * -3 which is larger than 4

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

Love such rounds with a lot of hacks :-) the best present for Valentine's day. :roffle!

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

Очень прикольные задания, но у меня отрубилась сеть!!! нет вы прикинте.. еще 3 часа в доме не было света)) Столько негатива конечно)) но сами задания интересные, авторам спасибо!! лан поднимусь еще разок потом..

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

Hey guys,

Please can anybody tell me the correct answer for input of problem A Div1:

200

2 1 1 2 1 2 2 2 2 2 1 2 2 1 1 2 2 1 1 1 2 1 1 2 2 2 2 2 1 1 2 1 2 1 1 2 1 1 1 1 2 1 2 2 1 2 1 1 1 2 1 1 1 2 2 2 1 1 1 1 2 2 2 1 2 2 2 1 2 2 2 1 2 1 2 1 2 1 1 1 1 2 2 2 1 1 2 1 2 1 2 1 2 2 1 1 1 2 2 2 2 1 2 2 2 1 1 1 1 2 1 1 1 2 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 2 2 1 2 2 2 1 1 1 1 2 1 2 1 1 1 2 1 2 2 2 1 2 1 1 1 1 1 1 2 1 1 2 2 2 1 2 1 1 1 1 2 2 1 2 1 2 1 2 1 2 1 2 2 1 1 1 1 2 2 1 1 2 2 1 2 2 1 2 2 2

thank you!

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

How to solve Div.1 A in O(n)?

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

    You can do a dp using current element, value of last, and the current state (non decresing, non incresing and non decresing again) [n][2][3]. This part that we'll reverse is the part that we consider non incresing

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

codeforces problem is like you can do both hack and AC..

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

can someone please help me with my code for DIv2C : https://ideone.com/Nd1oiy

It's an O(N^2) solution but it gives me TLE on test 11!

Edit : please don't mind. I am thinking totally wrong.

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

    Its not O(N^2). You call rev() function into two for loops and every time you call a for loop in rev(). That means 3-nested loops. So its O(N^3)

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

    Your solution is not O(n2), it goes to O(n3) as for each pair (i, j) you are swapping times. So each pair will be O(n2) and for this you are going at max on average n/4 times, hence O(n3). Correct me if I am wrong.

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

For Div. 2 D, I could reach the conclusion that p must be in the form of a0 - a1 * k + a2 * k2 - a3 * k3..... + ( - 1)n * an * kn
How do I move ahead from this conclusion? Is there a theorem or property that I am missing? Please guide. Thanks.

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

    Now you are trying to represent p as a base (-k) integer.

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

      Seems like I need to go back and revise basics of number theory. I had no clue that a number can be written in (-k) base. >_<. Thanks anyway.

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

The reason why I don't need a valentine. :P

Codeforces is already my <3

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

Failed 1C due to the floating point precision error...

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

Can someone explain why my solution for Div2A failed on testcase 10 35279033

My solution is :

1-Sorting both arrays ascendant

2-check if the last element in Big Banban's array is positive

then i will check for the element tommy[n-2] if its negative answer will be

cout << '-' << (ll) (abs(x[n - 2]) * (ll) z[m - 1]);

if it positive answer will be

cout << (ll) (x[n - 2] * (ll) z[m - 1]);

and same as if Big Banban is negative

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

    In testcase 10 Tommy has 50 negative numbers and Banban has 50 positive numbers.

    so Banbans strat is to pick numbers with lowest absolute value, because product is guaranteered to be negative

    but you pick the num with largest abs from Banban's numbers

    p.s. by the way, this problem is relatively complex until you make a key observation: the input set is so small that you can just brute force all the combinations

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

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

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

Thanks to your fantastic tasks, I could finally go into a new year with a new rating and a new color.

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

Hack for Div2 A ?

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

Can someone please explain solution of Div2 C clearly and in an easy way? Appreciate your help!

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

Happy New Year! Chúc Mừng Năm Mới!

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

for problem A i find a hack but it is not in test case: the hack is: 3 3 -1 0 0 1 1 1

my code output is -1e8 but ans is 0: http://codeforces.com/contest/934/submission/35661651