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

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

Problem: 1560F1 - Ближайшее красивое число (упрощённая версия)

Hi, in my submissions: 127141856 and 127141658, the code is the same. However I am failing testcases which I am not failing in custom test on the website "https://mirror.codeforces.com/problemset/customtest". For example in the submisson 127141658, I am failing on the testcase where n = 10 and k = 1, where the "supposed output" is 1110, but in the custom test, I would get the correct output "11" , if I wrote an input where t = 1, n = 10, and k = 1.

In the other submission I tried to use C++14 compiler instead of C++17. I still end up failing a similar case which doesn't fail in custom test.

Why is this happening?

Any information would be appreciated.

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

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

I think this happens because you forgot to flash your output in the following case.

else if (uniqueCnt > k)