Блог пользователя Mr.Whitebird

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

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?

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

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

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

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.

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

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