Language: C++

#define n'   '
L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}


Compiler output:
a.cc:1:9: warning: ISO C++11 requires whitespace after the macro name
    1 | #define n'   '
      |         ^
a.cc:2:3: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |   ^
a.cc:2:10: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |          ^
a.cc:2:15: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |               ^
a.cc:2:27: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                           ^
a.cc:2:34: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                  ^
a.cc:2:41: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                         ^
a.cc:2:254: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                                                                                                                                                                                                                              ^
a.cc:2:257: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                                                                                                                                                                                                                                 ^
a.cc:2:289: warning: multi-character character constant [-Wmultichar]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                                                                                                                                                                                                                                                                 ^
a.cc:2:1: error: 'L' does not name a type
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      | ^
a.cc:2:8: error: 'F' does not name a type
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |        ^
a.cc:2:18: error: 'i' does not name a type
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                  ^
a.cc:2:53: error: 'a' was not declared in this scope
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                     ^
a.cc:2:55: error: 'k' was not declared in this scope
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                       ^
a.cc:2:57: error: 'l' was not declared in this scope
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                         ^
a.cc:2:59: error: 'r' was not declared in this scope
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                           ^
a.cc:2:61: error: 'b' was not declared in this scope
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                             ^
a.cc:2:62: error: expression list treated as compound expression in initializer [-fpermissive]
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                              ^
a.cc:2:164: error: expected constructor, destructor, or type conversion before '(' token
    2 | L[n],p;F[n],X[n];i;long D[n*4],Z[n*4],A[n],x;long f(a,k,l,r,b){return(Z[k]+=!(b=a>l|-r<~i)*x)+(D[k]=l<=i&a<r&b?fmax(f(a,2*k,l,b),f(a,2*k+1,b=l+r>>1,r)):D[k]);}main(j){for(gets(L);~scanf("%d%d%ld",L+j,&p,A+j);F[p]=j++)X[j]=F[p];for(;p?:(p=F[++i],f(i,1,0,n),n/i);p=X[p])x=A[p],x=f(L[p],1,0,n);printf("%ld",x);}
      |                                                                                                                                                                    ^