MateoCV's blog

By MateoCV, 15 months ago, In English

Hola Codeforces!

The 2023 Argentinian Programming Tournament (TAP) was held last weekend. This is a 2023-2024 ICPC subregional contest for teams from Argentina to qualify to the South America/South Regional contest. You can send your solutions or do a virtual participation in the Codeforces gym. I invite you all to solve the problems.

The problems were written and prepared by elsantodel90, fredy10, Guty, lsantire, pablobce and me (MateoCV)

I would like to thank MarcosK for solving and reviewing the problems and providing valuable feedback.

Feel free to use this blog to discuss about the problems :)

Happy coding!

  • Vote: I like it
  • +92
  • Vote: I do not like it

| Write comment?
»
15 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Can someone give me any hints on how to do A?

  • »
    »
    15 months ago, # ^ |
    Rev. 3   Vote: I like it +9 Vote: I do not like it

    If we do exactly what the statement says: "for each trip go through all offices giving alfajores away and see how many are left at the end", then we end up with a $$$O(N \cdot M)$$$ solution, which is too slow. But we can improve it:

    Hint 1
    Hint 2
    Hint 3
    Solution
»
15 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Can someone give me any hints on how to do E?

  • »
    »
    15 months ago, # ^ |
    Rev. 3   Vote: I like it +9 Vote: I do not like it

    The name of the variables used below are the same as in the problem statement

    Hint 1
    Hint 2
    Hint 3
    Solution
»
14 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone explain to me why my idea for problem G is wrong?

Spoiler
  • »
    »
    14 months ago, # ^ |
      Vote: I like it +11 Vote: I do not like it

    The idea was correct, it was an implementation error, but I leave the comment in case anyone wants a hint of the solution.

»
14 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it
Can somebody check what is wrong with my solution in problem n.
It seems like I am correct , but don't know if there is some mistake.
https://pastebin.com/h0WrBATx
//idea is like 1 4 , 2 3 , 1 1 1 2 , 1 1 3 , 1 1 1 1 1 , 0   (modules)
//  fix {1 , 4} with bs on {2 , 3}
»
11 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can someone give me any hints on how to do H?

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

Can someone give me any hints on how to do N? Please

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

Can someone give me any hints on how to do I?

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

    Use the fact that (T+C)(Q+C) <= 10^6, i.e T*Q + C*T + C*Q + C*C <= 10^6. If you can calculate distance between a pair of figures in O(1), you can calculate for any circle the distance to any other figure and also the distance between every pair (triangle, square). Think how can you solve the problem with these data.