Borderou de evaluare (job #1655126)

Utilizator SilviuIIon Silviu SilviuI Data 17 martie 2016 19:13:24
Problema Expresie Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:11:1: error: ‘ll’ does not name a type ll sol,sum[nmax]; ^ user.cpp: In function ‘int main()’: user.cpp:18:18: error: expected primary-expression before ‘)’ token scanf("%d",&n); ^ user.cpp:20:22: error: expected primary-expression before ‘;’ token for (int i=1;i<=n;i++) scanf("%d",&t[i]); ^ user.cpp:22:22: error: expected primary-expression before ‘;’ token for (int i=1;i<=n;i++) sum[i]=sum[i-1]+t[i]; ^ user.cpp:22:28: error: ‘sum’ was not declared in this scope for (int i=1;i<=n;i++) sum[i]=sum[i-1]+t[i]; ^ user.cpp:24:21: error: expected primary-expression before ‘;’ token for (int i=1;i<n;i++) ^ user.cpp:25:27: error: expected primary-expression before ‘;’ token for (int j=i+1;j<n;j++) ^ user.cpp:27:17: error: ‘sol’ was not declared in this scope sol=max(sol,1LL*t[i]*t[j]*t[j+1]+sum[n]-sum[j+1]); ^ user.cpp:27:50: error: ‘sum’ was not declared in this scope sol=max(sol,1LL*t[i]*t[j]*t[j+1]+sum[n]-sum[j+1]); ^ user.cpp:27:55: error: expected primary-expression before ‘]’ token sol=max(sol,1LL*t[i]*t[j]*t[j+1]+sum[n]-sum[j+1]); ^ user.cpp:29:17: error: ‘sol’ was not declared in this scope sol=max(sol,1LL*t[i]*t[i+1]+1LL*t[j]*t[j+1]+(sum[j-1]-sum[i+1])+(sum[n]-sum[j+1])); ^ user.cpp:29:62: error: ‘sum’ was not declared in this scope sol=max(sol,1LL*t[i]*t[i+1]+1LL*t[j]*t[j+1]+(sum[j-1]-sum[i+1])+(sum[n]-sum[j+1])); ^ user.cpp:29:87: error: expected primary-expression before ‘]’ token sol=max(sol,1LL*t[i]*t[i+1]+1LL*t[j]*t[j+1]+(sum[j-1]-sum[i+1])+(sum[n]-sum[j+1])); ^ user.cpp:31:19: error: ‘sol’ was not declared in this scope printf("%lld",sol); ^ user.cpp:15:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("expresie.in","r",stdin); ^ user.cpp:16:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("expresie.out","w",stdout); ^ user.cpp:20:45: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]

Ceva nu functioneaza?