SmartCoder's blog

By SmartCoder, 17 months ago, In English

I just wonder if it was a common misinterpretation or it's only me, the problem says

If Ti=0, the i-th item is a pull-tab can; if you obtain it, you get a happiness of Xi.

If Ti=1, the i-th item is a regular can; if you obtain it and use a can opener against it, you get a happiness of Xi.

If Ti=2, the i-th item is a can opener; it can be used against at most Xi cans.

for Ti=1, my understanding is I can use it with a can opener, but I don't see anywhere in the statement where it says I can use it with 0 happiness.
Atcoder says I need to carefully read the problem statement and I'm the only one who didn't understand the problem.
I understand I can use any Ti=0, I understand I can use any Ti=2, but it's not clear if Ti=1 I still can use it with 0 happiness.
https://atcoder.jp/contests/abc312/tasks/abc312_f

  • Vote: I like it
  • -13
  • Vote: I do not like it

»
17 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Yes nowadays problem statements tend to be more difficult to understand. That is a bad trend which should be stopped immediately.

»
17 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
17 months ago, # |
  Vote: I like it +5 Vote: I do not like it

I don't understand your question.

  • »
    »
    17 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The problem statement says I need to take exactly M items, so let's take an example that will clarify my question.
    4 4
    0 2
    2 1
    1 4
    1 3
    what will be the answer!?
    -------------
    I say I can't take M items, so the answer will be zero, but they say the answer is 6.
    - get the pull-tab can with happiness 2.
    - get the opener can so we can open another can.
    - get the regular can with happiness 4.
    now I got 3 cans, I don't have enough opener cans so I can't get the regular can with happiness 3. but the problem writer says I can get M items, and I can get the last regular can with happiness 0, and I don't see anywhere in the statement says I can do that.

    • »
      »
      »
      17 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      There is no restriction to pick a regular can. You can just pick M cans. But you can get happiness if you obtain and use a can opener against it.

      • »
        »
        »
        »
        17 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        This is exactly the problem, it's not clear in the statement that I can take a regular can without opener, also the examples doesn't clarify that, anyways thanks for your reply.