Help in APIO 2015 skyscrapers

I have a doubt in https://oj.uz/problem/view/APIO15_skyscraper
I wrote a solution for 57 points but getting only 36 because of wa on a test file in subtask 4

I also checked for overflows and other things but can’t figure out the mistake even after trying for a long time
the ideal solution is O(nm) using 0-1 bfs and some manipulations
heres my solution https://oj.uz/submission/205644

the second solution is to use djikstra and some manipulations with huge constant optimizations
my solution is getting wa on the same test case
https://oj.uz/submission/205672

heres the editorial for the question(my approach is same/similar) - https://github.com/ia-toki/apio-2015/blob/master/analysis.pdf

can someone help
@aryanc403
@ssjgz
@vijju123
@admin

Read the constraints of Subtask 4 carefully :slight_smile:

1 Like

the error was really very silly got rid of it
but now I am getting mle on some later testcase in subtask 4(same testcase in both solution)

can you help -https://oj.uz/submission/205810 (0-1) bfs
https://oj.uz/submission/205808 (djikstra)

thanks @admin
@tmwilliamlin