#163
stergere
Să se șteargă dintr-un vector toate elementele care sunt numere prime.
Problema | stergere | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54327765 | Utilizator | |
Fișier | stergere.cpp | Dimensiune | 346 B |
Data încărcării | 25 Noiembrie 2024, 20:57 | Scor / rezultat | Eroare de compilare |
stergere.cpp:2:21: warning: extra tokens at end of #include directive [enabled by default] #include <iostream> using namespace std; ^ stergere.cpp: In function 'int main()': stergere.cpp:5:14: error: expected ']' before ';' token int n,v[10001; cin>>n; ^ stergere.cpp:5:16: error: 'cin' was not declared in this scope int n,v[10001; cin>>n; ^ stergere.cpp:5:16: note: suggested alternative: In file included from stergere.cpp:2:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ stergere.cpp:7:6: error: 'v' was not declared in this scope cin>>v[i]; ^ stergere.cpp:11:5: error: 'v' was not declared in this scope if (v[i] <2) ^ stergere.cpp:11:7: error: 'i' was not declared in this scope if (v[i] <2) ^ stergere.cpp:13:5: error: expected ',' before ';' token ok=0; ^ stergere.cpp:13:5: error: expected identifier before ';' token stergere.cpp:13:5: error: expected ']' before ';' token stergere.cpp: In lambda function: stergere.cpp:13:5: error: expected '{' before ';' token stergere.cpp: In function 'int main()': stergere.cpp:15:10: error: expected ')' before 'p' if (v[i] p==0) ^ stergere.cpp: At global scope: stergere.cpp:22:1: error: expected unqualified-id before 'for' for (int i=0;i<n;i++) ^ stergere.cpp:22:14: error: 'i' does not name a type for (int i=0;i<n;i++) ^ stergere.cpp:22:18: error: 'i' does not name a type for (int i=0;i<n;i++) ^ stergere.cpp:25:1: error: 'cout' does not name a type cout<<<v[i]<<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema stergere 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ă.