Hello Codeforces!
After Tuesday's contest, I decided to learn a little bit more about Sparse Tables. While solving this problem on Codechef, I came across some code that has been heavily confusing me for the past few hours. Basically, when I initialize the sparse table "table" as an array, everything works great. But when I initialize it as a 4-D vector inside the function "build_table", the code gives segmentation fault on large test cases! I've attached both submissions below. Any help would be extremely appreciated!
Submission 2 (Vector, Seg Fault)
Thanks! -Simon