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

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

Problem link: https://www.spoj.com/problems/ADASEA/ 1

The implementation was pretty straightforward but I couldn’t understand how the expected value would work in this case.

I found a solution here: https://github.com/tr0j4n034/SPOJ/blob/master/ADASEA.cpp

The idea was to find all separate longest paths containing ‘#’ in them and just squaring them and adding it to the answer and finally dividing it by all the cells. Can someone tell me how does this work? Why does squaring all the paths work in this case?

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

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

Автор fan_balae, история, 5 лет назад, По-русски

Link to submission: https://mirror.codeforces.com/contest/1324/submission/81004543

The algorithm is similar to what most others used but this is showing a TLE on the 24th test. Can anyone point out my error?

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

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

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

This is specifically for IntelliJ as it’s highly recommended for Java but the debugger is not as I want it to be. The functionality seems pretty good but debugging 2D arrays is a pain as I can’t get a complete view of the array at once as opposed to an Eclipse editor. So can anyone suggest a workaround or tell me how you use it for this purpose?

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

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