#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 | #54196645 | Utilizator | |
Fișier | halfsort.cpp | Dimensiune | 643 B |
Data încărcării | 21 Noiembrie 2024, 20:32 | Scor / rezultat | Eroare de compilare |
halfsort.cpp: In function 'int main()': halfsort.cpp:9:5: error: expected ',' or ';' before 'int' int n,k,v[1009],i; ^ halfsort.cpp:10:10: error: 'n' was not declared in this scope fin>>n; ^ halfsort.cpp:11:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ halfsort.cpp:12:14: error: 'v' was not declared in this scope fin>>v[i]; ^ halfsort.cpp:13:9: error: 'i' was not declared in this scope for(i=1;i<n;i++) ^ halfsort.cpp:17:16: error: 'v' was not declared in this scope if(v[i]>v[j]) ^ halfsort.cpp:21:9: error: 'i' was not declared in this scope for(i=1;i<=n/2;i++) ^ halfsort.cpp:22:15: error: 'v' was not declared in this scope fout<<v[i]<<" "; ^ halfsort.cpp:24:9: error: 'i' was not declared in this scope for(i=n/2+1;i<n;i++) ^ halfsort.cpp:28:16: error: 'v' was not declared in this scope if(v[i]<v[j]) ^ halfsort.cpp:33:9: error: 'i' was not declared in this scope for(i=n/2+1;i<=n;i++) ^ halfsort.cpp:34:15: error: 'v' was not declared in this scope fout<<v[i]<<" "; ^
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ă.