/in/foo.cc: In function 'void insert(int&, int, int, int)':
/in/foo.cc:15:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (!k) k=++cnt; if (l==r) return; d[k]++;
^~
/in/foo.cc:15:19: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (!k) k=++cnt; if (l==r) return; d[k]++;
^~
/in/foo.cc: In function 'int query(int, int, int, int)':
/in/foo.cc:20:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (l==r) return l; int mid=(l+r)>>1;
^~
/in/foo.cc:20:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (l==r) return l; int mid=(l+r)>>1;
^~~
/in/foo.cc: In function 'long long int calline(int)':
/in/foo.cc:25:26: error: 'tot' was not declared in this scope
int r=query(root[n+1],1,tot,x); insert(root[n+1],1,tot,r);
^~~
/in/foo.cc: In function 'long long int calrow(int, int)':
/in/foo.cc:29:24: error: 'tot' was not declared in this scope
int r=query(root[x],1,tot,y); insert(root[x],1,tot,r);
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:33:28: error: 'tot' was not declared in this scope
scanf("%d%d%d",&n,&m,&Q); tot=Q+max(n,m);
^~~