finally...was failing due to stupid long :(
implemented the marble_gf/Main.java using FenwickTree.java.