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

Блог пользователя meta-totle

Автор meta-totle, история, 4 года назад, По-английски

In the first problem of this round the number of operations is the number of bags and you have to include all the indices of the bags. The order of the indices doesn't matter because every bag gets added with the number of candies of the unaffected bag, in the end filling every bag with equally n(n+1)/2 candies. This is what I understand. There is no need to minimize m operations either, so can anyone tell me why this submission is wrong?

https://codeforces.me/contest/1447/submission/98465795

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

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

The order of the indices does matter. In the j-th operation, you will pick one bag and add j candies to all bags apart from the chosen one. What matters is the index of the operation, not the number of candies in the specified bag.

Why are you writing a blog post on something that can easily be solved by rereading the question?