#183
sortPP
Să se ordoneze crescător elementele pătrat perfect ale unui şir dat, fără a afecta elementele care nu sunt pătrat perfect.
Problema | sortPP | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54138858 | Utilizator | |
Fișier | sortpp.cpp | Dimensiune | 1.42 KB |
Data încărcării | 20 Noiembrie 2024, 17:00 | Scor / rezultat | Eroare de compilare |
sortpp.cpp:18:5: error: stray '\304' in program int pătratePerfecte[n]; ^ sortpp.cpp:18:5: error: stray '\203' in program sortpp.cpp:19:5: error: stray '\304' in program int numarPătrate = 0; ^ sortpp.cpp:19:5: error: stray '\203' in program sortpp.cpp:25:13: error: stray '\304' in program pătratePerfecte[numarPătrate++] = v[i]; ^ sortpp.cpp:25:13: error: stray '\203' in program sortpp.cpp:25:13: error: stray '\304' in program sortpp.cpp:25:13: error: stray '\203' in program sortpp.cpp:30:5: error: stray '\304' in program for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:30:5: error: stray '\203' in program sortpp.cpp:31:9: error: stray '\304' in program for (int j = 0; j < numarPătrate - i - 1; j++) { ^ sortpp.cpp:31:9: error: stray '\203' in program sortpp.cpp:32:13: error: stray '\304' in program if (pătratePerfecte[j] > pătratePerfecte[j + 1]) { ^ sortpp.cpp:32:13: error: stray '\203' in program sortpp.cpp:32:13: error: stray '\304' in program sortpp.cpp:32:13: error: stray '\203' in program sortpp.cpp:33:17: error: stray '\304' in program int temp = pătratePerfecte[j]; ^ sortpp.cpp:33:17: error: stray '\203' in program sortpp.cpp:34:17: error: stray '\304' in program pătratePerfecte[j] = pătratePerfecte[j + 1]; ^ sortpp.cpp:34:17: error: stray '\203' in program sortpp.cpp:34:17: error: stray '\304' in program sortpp.cpp:34:17: error: stray '\203' in program sortpp.cpp:35:17: error: stray '\304' in program pătratePerfecte[j + 1] = temp; ^ sortpp.cpp:35:17: error: stray '\203' in program sortpp.cpp:45:13: error: stray '\304' in program v[i] = pătratePerfecte[idx++]; ^ sortpp.cpp:45:13: error: stray '\203' in program sortpp.cpp: In function 'int main()': sortpp.cpp:18:12: error: expected initializer before 'tratePerfecte' int pătratePerfecte[n]; ^ sortpp.cpp:19:17: error: expected initializer before 'trate' int numarPătrate = 0; ^ sortpp.cpp:25:13: error: 'p' was not declared in this scope pătratePerfecte[numarPătrate++] = v[i]; ^ sortpp.cpp:25:16: error: expected ';' before 'tratePerfecte' pătratePerfecte[numarPătrate++] = v[i]; ^ sortpp.cpp:30:25: error: 'numarP' was not declared in this scope for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:30:33: error: expected ';' before 'trate' for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:30:33: error: 'trate' was not declared in this scope sortpp.cpp:30:42: error: expected ')' before ';' token for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:30:44: error: 'i' was not declared in this scope for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:30:47: error: expected ';' before ')' token for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:56:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sortPP 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ă.