moss3s's blog

By moss3s, history, 5 years ago, In English

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

Full text and comments »

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

By moss3s, history, 5 years ago, In English

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?

Full text and comments »

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

By moss3s, history, 5 years ago, In English

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 =(

Full text and comments »

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

By moss3s, history, 5 years ago, In English

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

Full text and comments »

Tags php, bom, fun, bug
  • Vote: I like it
  • +117
  • Vote: I do not like it