#86
HalfSort
Să se scrie un program care ordonează crescător elementele din prima jumătate a unui vector și descrescător elementele din a doua jumătate.
Problema | HalfSort | Operații I/O |
halfsort.in /halfsort.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50908156 | Utilizator | |
Fișier | halfsort.cpp | Dimensiune | 699 B |
Data încărcării | 13 Mai 2024, 19:44 | Scor / rezultat | Eroare de compilare |
halfsort.cpp: In function 'int main()': halfsort.cpp:9:9: error: 'fin' was not declared in this scope fin >> a[i]; ^ halfsort.cpp:9:16: error: 'a' was not declared in this scope fin >> a[i]; ^ halfsort.cpp:12:16: error: 'a' was not declared in this scope if(a[i]>a[j]){ ^ halfsort.cpp:19:16: error: 'a' was not declared in this scope if(a[i]<a[j]){ ^ halfsort.cpp:25:9: error: 'fout' was not declared in this scope fout << a[i] << " "; ^ halfsort.cpp:25:17: error: 'a' was not declared in this scope fout << a[i] << " "; ^ halfsort.cpp:26:5: error: 'fout' was not declared in this scope fout << endl; ^ halfsort.cpp:28:1: error: expected 'while' at end of input } ^ halfsort.cpp:28:1: error: expected '(' at end of input halfsort.cpp:28:1: error: expected primary-expression at end of input halfsort.cpp:28:1: error: expected ')' at end of input halfsort.cpp:28:1: error: expected ';' at end of input halfsort.cpp:4:18: warning: unused variable 'aux' [-Wunused-variable] {int n,v[1001],i,aux,ordonat,d,prim; ^ halfsort.cpp:4:30: warning: unused variable 'd' [-Wunused-variable] {int n,v[1001],i,aux,ordonat,d,prim; ^ halfsort.cpp:4:32: warning: unused variable 'prim' [-Wunused-variable] {int n,v[1001],i,aux,ordonat,d,prim; ^ halfsort.cpp:28:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema HalfSort 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ă.