/in/foo.cc:6:1: error: 'LL' does not name a type
LL a[N];
^~
/in/foo.cc: In function 'int main()':
/in/foo.cc:14:28: error: 'a' was not declared in this scope
for(int i=1;i<=n;i++)cin>>a[i];
^
/in/foo.cc:15:8: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
cin>>s+1;
~^~
/in/foo.cc:25:8: error: 'a' was not declared in this scope
x=a[i]+a[i-1];
^
/in/foo.cc:27:8: error: 'a' was not declared in this scope
y=a[i]+a[i+1];
^
/in/foo.cc:42:11: error: 'a' was not declared in this scope
res+=a[i-1]+a[i];
^