/in/foo.cc:4:22: error: expected initializer before 'q'
int f[50018],a[50018]q[100008],n,t;
^
/in/foo.cc: In function 'bool check(int)':
/in/foo.cc:9:20: error: 'n' was not declared in this scope
for(int i=1;i<=n;i++)
^
/in/foo.cc:11:30: error: 'q' was not declared in this scope
while(head<=front&&i-q[head]>mid+1)head++;
^
/in/foo.cc:12:16: error: 'q' was not declared in this scope
f[i]=f[q[head]]+a[i];
^
/in/foo.cc:12:25: error: 'a' was not declared in this scope
f[i]=f[q[head]]+a[i];
^
/in/foo.cc:18:15: error: 'n' was not declared in this scope
for(int i=n-mid;i<=n;i++)
^
/in/foo.cc:22:13: error: 'm' was not declared in this scope
if(ans<=m)return true;
^
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:19: error: 'n' was not declared in this scope
scanf("%d%d",&n,&t);
^
/in/foo.cc:28:22: error: 't' was not declared in this scope
scanf("%d%d",&n,&t);
^
/in/foo.cc:31:21: error: 'a' was not declared in this scope
scanf("%d",&a[i]);
^