Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

Автор moss3s, история, 6 лет назад, По-английски

Hello.

I regular read solutions by other authors.
The fastest and the shortest often contain useful ideas.
Don't know, why, but there is no direct link from problem-page to problem-status-page.

This userscript extends menu by one item. example.png

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

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

Автор moss3s, история, 6 лет назад, По-английски

I solved 1084F - Max Mex in archive. As a result, my O(q·nlogn) (due to LCA in linear time) solution gets OK (but n = q = 200 000).

Of course, there is a simple test to get Θ(q·nlogn) and working time >10min.

Is there any way to add this test to the testing system? Does it make sense?

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

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

Автор moss3s, история, 6 лет назад, По-английски

I'm new on codeforces, and rarely use c++. Maybe the question was already discussed, but i cannot find anything except this.

Today i first time used c++ on the contest. And got message kind of "your code was not submitted, do not use %lld".

  1. Why is it bad idea to use %lld in 2018? Maybe this message is rudiment, and it is good time to dismiss it forever?

  2. Is it normal to not accept compilable code 1 second before end of the contest? Of course, now i see checkbox "submit anyway", but spent last seconds on testing and had no time to resubmit =(

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

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

Автор moss3s, история, 6 лет назад, По-английски

Hi. I'd like to tell you short story.

Do you like to get outcomes like this?

wrong answer 1st words differ - expected: '1/2', found: '1/2'

I was bit confused. 46296564

After short experiment i've got OK with exactly? same code: 46298129. Look inside, compare, are the sources same?

The only difference is in BOM (byte order mark, prefix 0xEF,0xBB,0xBF of file).

The first submission is source code in utf-8 with BOM, the second one has no BOM. It turns out, if source code contains BOM, php produces stdout with BOM, and of course checker can not parse it correctly.

Seems to be bug in php.

P.S. Please, don't ask, why php :D

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

Теги php, bom, fun, bug
  • Проголосовать: нравится
  • +117
  • Проголосовать: не нравится