#2858
Se consideră un șir a1, a2, …, an de numere naturale.
10.3 și aflate pe poziții impare.| Problema | pv | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64196888 | Utilizator | |
| Fișier | pv.cpp | Dimensiune | 678 B |
| Data încărcării | 22 Aprilie 2026, 14:18 | Scor/rezultat | Eroare de compilare |
pv.cpp: In function ‘int main()’: pv.cpp:5:5: error: ‘cin’ was not declared in this scope 5 | cin>>n; | ^~~ pv.cpp:9:9: error: ‘cout’ was not declared in this scope 9 | cout<<v[i]<<" "; | ^~~~ pv.cpp:10:5: error: ‘cout’ was not declared in this scope 10 | cout<<endl; | ^~~~ pv.cpp:10:11: error: ‘endl’ was not declared in this scope 10 | cout<<endl; | ^~~~ pv.cpp:17:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for (int i=1;i<=n; i++) | ^~~ pv.cpp:19:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 19 | cout<<s1; | ^~~~ pv.cpp:22:8: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 22 | for(int i=1; i<=n;i++) | ^~~ pv.cpp:24:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 24 | cout<<s2; | ^~~~ pv.cpp:27:11: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 27 | for(int i=1; i<=n; i++) | ^~~ pv.cpp:29:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 29 | cout<<s3; | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pv 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ă.