#define NMAX 100010 int tree[NMAX];int N; int read(int x){ int sum = 0; for(; x; x -= (x&-x)){ sum += tree[x]; } return sum;} void update(int x, int val){ for(; x < N; x += (x&-x)){ tree[x] += val; }} int query(int i, int j){ return read(j)-read(i-1);}
Standard input is empty
/usr/lib/gcc/i586-linux-gnu/5/../../../i386-linux-gnu/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: error: ld returned 1 exit status
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!