#4096
balba
Un palilindrom este un număr natural pentru care există o bâlbâială a regelui care îl transformă într-un palindrom. Spre exemplu, 25373552
este un palilindrom, pentru că după o bâlbâială poate deveni 255373552
, acesta fiind un număr palindrom. Fiind dat un număr natural nenul X
să se determine:
X
după o bâlbâială și câte numere diferite pot deveni X
după o bâlbâială.X
. Nu este obligatoriu să se folosească toate cifrele lui X
.OJI 2022 clasa a IX-a
Problema | balba | Operații I/O |
balba.in /balba.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49794223 | Utilizator | |
Fișier | balba.cpp | Dimensiune | 2.08 KB |
Data încărcării | 15 Martie 2024, 00:37 | Scor / rezultat | Eroare de compilare |
balba.cpp:11:19: error: conflicting declaration 'int f [12]' int v[100002],f[12]; ^ balba.cpp:7:10: error: 'f' has a previous declaration as 'std::ifstream f' ifstream f("balba.in"); ^ balba.cpp: In function 'int main()': balba.cpp:57:14: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') f[v[i]]++; ^ balba.cpp:61:13: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i]%2!=0) ^ balba.cpp:67:13: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i]!=0&&f[i]>=2) ^ balba.cpp:67:22: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[i]!=0&&f[i]>=2) ^ balba.cpp:85:29: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') for(i=1;i<=f[cif]/2;i++) ^ balba.cpp:91:17: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(f[cif]%2==1) ^ balba.cpp:95:27: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(b==0&&f[cif]!=1&&!(cif==0&&k==0)) ^ balba.cpp:129:25: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') if(par==1&&f[cif]>=4) ^ balba.cpp:133:18: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') f[cif]--; ^ balba.cpp:153:25: error: no match for 'operator[]' (operand types are 'std::ifstream {aka std::basic_ifstream<char>}' and 'int') for(i=1;i<=f[cif]/2;i++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema balba 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ă.