Mr.Whitebird's blog

By Mr.Whitebird, history, 13 days ago, In English

The submission is here: 265738238

I do not think that I use significant stack memory here, it is mostly heap memory. Also I have cloned to the mashup to test with 2GB memory limits and got exactly the same result.

The code is pretty clear in my opinion but I will be happy to clarify if asked.

Thanks for your interest.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Mr.Whitebird, history, 3 months ago, In English

The only difference between the two submissions is using a lambda function vs a global function. Lambda functions made the runtime around 7 times slower.

What do you think this is because?

AC: 255501228

TLE: 255500672

so should we always prefer global functions over lambdas then?

Full text and comments »

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

By Mr.Whitebird, history, 3 months ago, In English

Hello CodeForces, today I tried solving the problem from a recent contest: 1923E - Count Paths

My Solution:

Solution

If you see any problems with the code, please let me know as I can't see the problem. If you don't understand a part of the code, please ask and I will clarify.

Submission: 255437477

UPD: The runtime takes more than 30 seconds! So I guess the runtime is O(N^2) somehow.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it