128.c: done without using segment tree (unnessisary)