Problema | sir_munte | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50557258 | Utilizator | |
Fișier | sir_munte.cpp | Dimensiune | 467 B |
Data încărcării | 15 Aprilie 2024, 10:22 | Scor / rezultat | Eroare de compilare |
sir_munte.cpp: In function 'int main()': sir_munte.cpp:7:1: error: expected ';' before 'for' for(i=1; i<=n; i++) ^ sir_munte.cpp:7:11: warning: statement has no effect [-Wunused-value] for(i=1; i<=n; i++) ^ sir_munte.cpp:7:19: error: expected ';' before ')' token for(i=1; i<=n; i++) ^ sir_munte.cpp:9:17: error: 'ok' was not declared in this scope for(i=0; i<=n&& ok==1; i++) ^ sir_munte.cpp:11:25: error: 'pmax' was not declared in this scope if(v[i]>max){max=v[i];pmax=i;ok=1;}} ^ sir_munte.cpp:12:6: error: 'pmax' was not declared in this scope if (pmax==n-1 ||pmax=0)ok=0; ^ sir_munte.cpp:12:25: error: 'ok' was not declared in this scope if (pmax==n-1 ||pmax=0)ok=0; ^ sir_munte.cpp:13:13: error: 'pmax' was not declared in this scope for (i=1;i<pmax-1 && ok==1;i++) if(v[i]>=v[i+1]) ok=0; ^ sir_munte.cpp:13:23: error: 'ok' was not declared in this scope for (i=1;i<pmax-1 && ok==1;i++) if(v[i]>=v[i+1]) ok=0; ^ sir_munte.cpp:14:13: error: 'pmax' was not declared in this scope for (i=pmax+1;i<n-1 && ok==1;i++) if(v[i]<=v[i+1]) ok=0; ^ sir_munte.cpp:14:29: error: 'ok' was not declared in this scope for (i=pmax+1;i<n-1 && ok==1;i++) if(v[i]<=v[i+1]) ok=0; ^ sir_munte.cpp:15:10: error: 'ok' was not declared in this scope if (ok==1) cout<"DA"; ^ sir_munte.cpp:15:21: warning: value computed is not used [-Wunused-value] if (ok==1) cout<"DA"; ^ sir_munte.cpp:4:15: warning: unused variable 'm' [-Wunused-variable] { int v[1001],m=0,w[1001],n, x,i, ok1=0,ok2=0,max; ^ sir_munte.cpp:4:19: warning: unused variable 'w' [-Wunused-variable] { int v[1001],m=0,w[1001],n, x,i, ok1=0,ok2=0,max; ^ sir_munte.cpp:4:30: warning: unused variable 'x' [-Wunused-variable] { int v[1001],m=0,w[1001],n, x,i, ok1=0,ok2=0,max; ^ sir_munte.cpp:4:35: warning: unused variable 'ok1' [-Wunused-variable] { int v[1001],m=0,w[1001],n, x,i, ok1=0,ok2=0,max; ^ sir_munte.cpp:4:41: warning: unused variable 'ok2' [-Wunused-variable] { int v[1001],m=0,w[1001],n, x,i, ok1=0,ok2=0,max; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sir_munte face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.