#494
Se dă un vector x
cu n
elemente, numere naturale. Să se construiască un alt vector, y
, cu n
elemente, cu proprietatea că y[i]
este egal cu suma elementelor din x
, cu excepția lui x[i]
.
Problema | Constr1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57362457 | Utilizator | |
Fișier | constr1.cpp | Dimensiune | 1.74 KB |
Data încărcării | 27 Martie 2025, 14:21 | Scor / rezultat | Eroare de compilare |
constr1.cpp:45:14: error: stray '#' in program {#include <iostream> ^ constr1.cpp: In function 'int main()': constr1.cpp:45:15: error: 'include' was not declared in this scope {#include <iostream> ^ constr1.cpp:45:32: error: expected primary-expression before '>' token {#include <iostream> ^ constr1.cpp:48:1: error: expected primary-expression before 'using' using namespace std; ^ constr1.cpp:48:1: error: expected ';' before 'using' constr1.cpp:78:1: error: a function-definition is not allowed here before '{' token { ^ constr1.cpp:108:1: error: expected '}' at end of input } ^ constr1.cpp:108:1: error: expected '}' at end of input constr1.cpp:108:1: error: expected '}' at end of input constr1.cpp:35:17: warning: unused variable 'y' [-Wunused-variable] int v[201], y[1001], n, tempnum, s; ^ constr1.cpp:35:29: warning: unused variable 'tempnum' [-Wunused-variable] int v[201], y[1001], n, tempnum, s; ^ constr1.cpp:108:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Constr1 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ă.