#2441
O pereche de cuvinte, unul cu număr par de litere, iar celălalt cu număr impar de litere, se numește descentrată dacă se poate obține cuvântul cu număr par de litere din celălalt, prin duplicarea caracterului din mijlocul acestuia. Să se determine dacă există perechi descentrate de cuvinte.
simulare bacalaureat 2018
Problema | pereche descentrata | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #56136569 | Utilizator | |
Fișier | pereche_descentrata.cpp | Dimensiune | 2.39 KB |
Data încărcării | 07 Februarie 2025, 09:42 | Scor / rezultat | Eroare de compilare |
pereche_descentrata.cpp:66:2: error: stray '#' in program }#include <iostream> ^ pereche_descentrata.cpp:66:3: error: 'include' does not name a type }#include <iostream> ^ pereche_descentrata.cpp:71:11: error: redefinition of 'const int N' const int N = 100; ^ pereche_descentrata.cpp:6:11: error: 'const int N' previously defined here const int N = 100; ^ pereche_descentrata.cpp:73:11: error: redefinition of 'char s [101]' char s[N+1]; ^ pereche_descentrata.cpp:8:6: error: 'char s [101]' previously declared here char s[N+1]; ^ pereche_descentrata.cpp:74:17: error: redefinition of 'char* impare [50]' char *impare[N/2], *pare[N/2]; ^ pereche_descentrata.cpp:9:7: error: 'char* impare [50]' previously declared here char *impare[N/2], *pare[N/2]; ^ pereche_descentrata.cpp:74:29: error: redefinition of 'char* pare [50]' char *impare[N/2], *pare[N/2]; ^ pereche_descentrata.cpp:9:21: error: 'char* pare [50]' previously declared here char *impare[N/2], *pare[N/2]; ^ pereche_descentrata.cpp: In function 'bool gasit_pereche(const char*, char**, int)': pereche_descentrata.cpp:76:6: error: redefinition of 'bool gasit_pereche(const char*, char**, int)' bool gasit_pereche(const char s[], char *v[], int n) ^ pereche_descentrata.cpp:11:6: error: 'bool gasit_pereche(const char*, char**, int)' previously defined here bool gasit_pereche(const char s[], char *v[], int n) ^ pereche_descentrata.cpp: In function 'int main()': pereche_descentrata.cpp:92:5: error: redefinition of 'int main()' int main() ^ pereche_descentrata.cpp:27:5: error: 'int main()' previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pereche descentrata 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ă.