private static void rangeQ(int l, int r, int bSize, int[] a, long[] bSums, StringBuilder sb){
		long s=0;
		if(r-l<bSize){
			for(int k=l;k<=r;k++){
				s+=a[k];
			}
		} else {
			int lowerB = l/bSize + 1;
			int upperB = r/bSize;
			for(int k=l;k<=bSize*lowerB;k++){
				s+=a[k];
			}
//			System.out.println("DEBUG: "+s);
			while(lowerB < upperB){
				s+=bSums[++lowerB];
			}
//			System.out.println(s);
			for(int k=upperB*bSize+1;k<=r;k++){
				s+=a[k];
			}
		}
		sb.append(s);
		sb.append('\n');
	}