#903 Yet Another Prefix Sum Problem