How would i calculate a surface that up to 10^5 squares cover. The info you get is xpos,ypos and width for each square. How would you calculate the total surface covered (if any overlap only one counts).
Cannot use a big array of bools as the memory limit is 512 MiB.