Help in APIO 2015 skyscrapers

I have a doubt in View problem - Jakarta Skyscrapers (APIO15_skyscraper) :: oj.uz
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 Submission #205644 :: oj.uz

the second solution is to use djikstra and some manipulations with huge constant optimizations
my solution is getting wa on the same test case

heres the editorial for the question(my approach is same/similar) - apio-2015/analysis.pdf at master · ia-toki/apio-2015 · GitHub

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 -Submission #205810 :: oj.uz (0-1) bfs
Submission #205808 :: oj.uz (djikstra)

thanks @admin
@tmwilliamlin