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

Автор anil_1, 7 недель назад, По-английски

This is the problem url: https://mirror.codeforces.com/problemset/problem/1906/M

I can't understand the editorial of this problem. Specifically I don't understand the second scenario, how can we conclude M <= 2 * (S — M) will hold after one move. According to me, if the value of M is reduced by 0 or 1 and S is reduced by 3, this condition should not hold.

Полный текст и комментарии »

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

Автор anil_1, история, 3 года назад, По-английски

In the last Div2 round, for this problem 1627D - Not Adding, I think my submission 142872780 for the 4rth problem is not optimal and should not have passed but it did. One of the tests on which it should give TLE can be generated with

int n = 1e5;
cout << n << '\n';
for(int i = 0; i < n; i++) {
   cout << (i + 1) * 10 << ' ';
}
cout << '\n';

I want to know whether it passed due to weak constraints or there is something wrong with my above hypothesis.

Полный текст и комментарии »

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