Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

Автор nitin12384, история, 22 месяца назад, По-английски

I didn't find any announcement blog for ABC 278.
So I posted this .

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

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

Was intended solution for F, bitmask dp? I did that and got WA for 4 cases.

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

hint for E?

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

    Say you have answer of $$$(k,l)$$$
    What information do you need to keep track of, to be able to get answer of $$$(k, l+1)$$$ from answer of $$$(k,l)$$$?

    Also Notice that $$$N \le 300$$$. So keeping frequency count isn't that hard.

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

    Move the block ($$${w * h}$$$) in the following form.


    ------------- | ------------- | ------------- |

    so on..

    You can move the block by one step in $$${O(max(w, h))}$$$ so you may solve this problem in $$${O(H * W * max(h, w))}$$$. use map or unordered_map for counting distinct element and update them in each step of block.

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

How to solve G ?

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

    ++

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

    My solution(but didn't manage to get AC for now) was to consider two cases: when $$$l \neq r$$$ then first player always has winning strategy erasing cards in the middle to obtain two equal parts and then having the symmetric strategy. When $$$l = r$$$ then you can solve the problem in quadratic time using grundy values.

    Edit: got AC now.

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

C++ 20 when ?? I literally wrote C++ 20 built-in features today and erased realising atcoder doesn't have C++ 20

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

I think it was a good round. (Got a good +ve delta, so can't nitpick lol).

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

Would you please review my G? I think my implementation is super good...

https://atcoder.jp/contests/abc278/submissions/36653750

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

Query forces

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

I am a Newbie. I used list of unordered-map for problem C. I was getting a runtime error for like last 10 test cases. Can anyone help? My code

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

    Since you are creating a vector of size n(which in the worst case can be 10^9), you encounter an RE verdict.

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

      Oh. Brother, So is this happening beacause the possible max size of a vector is less than (10^9). And Can you please suggest an alternative....

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

        To be on the safe side, I would suggest using vectors when the max size is maybe less than 10^7. Or better use arrays. Whatever you use, the size should be at max 10^7. Sometimes 10^8 might work, but I haven't encountered any problem which needs such a huge array. In this problem, you can use a map. And another suggestion will be not to use unordered maps with the default hash method. Those are hackable. Ordered maps will do the job for you.

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

        I created a map that maps pairs to a Boolean value. (or you can create your own hash table) https://atcoder.jp/contests/abc278/submissions/36639240