foo.cpp:1:1: error: 'include' does not name a type
include<cstdio>
^
foo.cpp: In function 'int main()':
foo.cpp:5:18: error: 'n' was not declared in this scope
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.cpp:5:22: error: 's' was not declared in this scope
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.cpp:5:26: error: 't' was not declared in this scope
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.cpp:5:27: error: 'scanf' was not declared in this scope
scanf ("%d%d%d",&n ,&s ,&t);
^
foo.cpp:7:15: error: 'd' was not declared in this scope
scanf("%d" ,& d );
^
foo.cpp:8:15: error: 'f' was not declared in this scope
scanf("%d" ,& f[d]);
^
foo.cpp:10:1: error: 'N' was not declared in this scope
N[ f [ d ] ] += 1 ;
^
foo.cpp:11:16: error: 'l' was not declared in this scope
while(q!='\n'){l[d]+=1; scanf("%c",&q); }
^
foo.cpp:13:10: error: 'a' was not declared in this scope
int i=t; a-=N[t]; b =l[t];
^
foo.cpp:13:13: error: 'N' was not declared in this scope
int i=t; a-=N[t]; b =l[t];
^
foo.cpp:13:19: error: 'b' was not declared in this scope
int i=t; a-=N[t]; b =l[t];
^
foo.cpp:13:22: error: 'l' was not declared in this scope
int i=t; a-=N[t]; b =l[t];
^
foo.cpp:14:15: error: 'c' was not declared in this scope
while ( i ) { c[i] =1; i =f[i]; }
^
foo.cpp:14:27: error: 'f' was not declared in this scope
while ( i ) { c[i] =1; i =f[i]; }
^
foo.cpp:15:10: error: 'c' was not declared in this scope
while ( !c[s] ) { b+=l[s]; s =f[s]; a+=N[s]; }
^
foo.cpp:15:31: error: 'f' was not declared in this scope
while ( !c[s] ) { b+=l[s]; s =f[s]; a+=N[s]; }
^
foo.cpp:16:31: error: 'f' was not declared in this scope
while ( t !=s ) { a+=N[t]; t =f[t]; b+=l[t]; }
^
foo.cpp:17:20: error: 'printf' was not declared in this scope
printf("%d\n%d",b,a);
^