#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 | #54138916 | Utilizator | |
Fișier | sortpp.cpp | Dimensiune | 1.07 KB |
Data încărcării | 20 Noiembrie 2024, 17:01 | Scor / rezultat | Eroare de compilare |
sortpp.cpp:11:5: error: stray '\304' in program int pătratePerfecte[n]; ^ sortpp.cpp:11:5: error: stray '\203' in program sortpp.cpp:12:5: error: stray '\304' in program int numarPătrate = 0; ^ sortpp.cpp:12:5: error: stray '\203' in program sortpp.cpp:16:13: error: stray '\304' in program pătratePerfecte[numarPătrate++] = v[i]; ^ sortpp.cpp:16:13: error: stray '\203' in program sortpp.cpp:16:13: error: stray '\304' in program sortpp.cpp:16:13: error: stray '\203' in program sortpp.cpp:19:5: error: stray '\304' in program for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:19:5: error: stray '\203' in program sortpp.cpp:20:9: error: stray '\304' in program for (int j = 0; j < numarPătrate - i - 1; j++) { ^ sortpp.cpp:20:9: error: stray '\203' in program sortpp.cpp:21:13: error: stray '\304' in program if (pătratePerfecte[j] > pătratePerfecte[j + 1]) { ^ sortpp.cpp:21:13: error: stray '\203' in program sortpp.cpp:21:13: error: stray '\304' in program sortpp.cpp:21:13: error: stray '\203' in program sortpp.cpp:22:17: error: stray '\304' in program int temp = pătratePerfecte[j]; ^ sortpp.cpp:22:17: error: stray '\203' in program sortpp.cpp:23:17: error: stray '\304' in program pătratePerfecte[j] = pătratePerfecte[j + 1]; ^ sortpp.cpp:23:17: error: stray '\203' in program sortpp.cpp:23:17: error: stray '\304' in program sortpp.cpp:23:17: error: stray '\203' in program sortpp.cpp:24:17: error: stray '\304' in program pătratePerfecte[j + 1] = temp; ^ sortpp.cpp:24:17: error: stray '\203' in program sortpp.cpp:32:13: error: stray '\304' in program v[i] = pătratePerfecte[idx++]; ^ sortpp.cpp:32:13: error: stray '\203' in program sortpp.cpp: In function 'int main()': sortpp.cpp:11:12: error: expected initializer before 'tratePerfecte' int pătratePerfecte[n]; ^ sortpp.cpp:12:17: error: expected initializer before 'trate' int numarPătrate = 0; ^ sortpp.cpp:16:13: error: 'p' was not declared in this scope pătratePerfecte[numarPătrate++] = v[i]; ^ sortpp.cpp:16:16: error: expected ';' before 'tratePerfecte' pătratePerfecte[numarPătrate++] = v[i]; ^ sortpp.cpp:19:25: error: 'numarP' was not declared in this scope for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:19:33: error: expected ';' before 'trate' for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:19:33: error: 'trate' was not declared in this scope sortpp.cpp:19:42: error: expected ')' before ';' token for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:19:44: error: 'i' was not declared in this scope for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:19:47: error: expected ';' before ')' token for (int i = 0; i < numarPătrate - 1; i++) { ^ sortpp.cpp:41: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ă.