#4385
stergere2
Se dă un vector cu n
elemente numere naturale. Să se șteargă din vector toate elementele egale cu cea mai mică valoare din vector.
Problema | stergere2 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53835224 | Utilizator | |
Fișier | stergere2.cpp | Dimensiune | 364 B |
Data încărcării | 12 Noiembrie 2024, 19:54 | Scor / rezultat | Eroare de compilare |
stergere2.cpp:1:21: warning: extra tokens at end of #include directive [enabled by default] #include <iostream> #include <climits> using namespace std; ^ stergere2.cpp:16:1: error: stray '\357' in program n--; ^ stergere2.cpp:16:1: error: stray '\274' in program stergere2.cpp:16:1: error: stray '\233' in program stergere2.cpp: In function 'int main()': stergere2.cpp:4:25: error: 'cin' was not declared in this scope int v[1001],n,i,j,minn; cin>>n; ^ stergere2.cpp:4:25: note: suggested alternative: In file included from stergere2.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ stergere2.cpp:5:6: error: 'INT' was not declared in this scope minn=INT MAX; ^ stergere2.cpp:5:10: error: expected ';' before 'MAX' minn=INT MAX; ^ stergere2.cpp:7:6: error: 'vlil' was not declared in this scope cin>>vlil; ^ stergere2.cpp:9:6: error: 'il' was not declared in this scope if(v[il<minn) ^ stergere2.cpp:9:13: error: expected ']' before ')' token if(v[il<minn) ^ stergere2.cpp:10:11: error: expected ']' before ';' token minn=v [il; ^ stergere2.cpp:12:6: error: 'il' was not declared in this scope if(v[il==minn) ^ stergere2.cpp:12:14: error: expected ']' before ')' token if(v[il==minn) ^ stergere2.cpp:15:1: error: 'V' was not declared in this scope V[j-1]=v[jl; ^ stergere2.cpp:15:10: error: 'jl' was not declared in this scope V[j-1]=v[jl; ^ stergere2.cpp:15:12: error: expected ']' before ';' token V[j-1]=v[jl; ^ stergere2.cpp:17:1: error: expected ';' before 'i' i--; ^ stergere2.cpp:20:1: error: 'cout' was not declared in this scope cout<<v[il<<" " ^ stergere2.cpp:20:1: note: suggested alternative: In file included from stergere2.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ stergere2.cpp:20:9: error: 'il' was not declared in this scope cout<<v[il<<" " ^ stergere2.cpp:21:1: error: expected ']' before 'return' return 0; ^ stergere2.cpp:21:1: error: expected ';' before 'return'
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema stergere2 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ă.