#294
Se dă un şir cu n elemente, numere naturale. Să se verifice dacă oglinditul primului element apare printre celelalte elemente ale șirului.
| Problema | EgaleOglindit | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64492889 | Utilizator | |
| Fișier | egaleoglindit.cpp | Dimensiune | 462 B |
| Data încărcării | 11 Mai 2026, 09:24 | Scor/rezultat | Eroare de compilare |
egaleoglindit.cpp: In function ‘int main()’: egaleoglindit.cpp:14:20: error: expected ‘(’ before ‘v’ 14 | if v[i] % 10 == v[i + 1] / 10 && if v[i] / 10 == v[i + 1] % 10; | ^ | ( egaleoglindit.cpp:15:20: error: expected ‘(’ before ‘v’ 15 | if v[i] % 100 == v[i + 1] / 100 && if v[i] / 100 == v[i + 1] % 100; | ^ | ( egaleoglindit.cpp:16:20: error: expected ‘(’ before ‘v’ 16 | if v[i] % 1000 == v[i + 1] / 1000 && if v[i] / 1000 == v[i + 1] % 1000; | ^ | ( egaleoglindit.cpp:25:17: error: ‘else’ without a previous ‘if’ 25 | else | ^~~~ egaleoglindit.cpp:26:29: error: expected ‘;’ before string constant 26 | cout "NU"; | ^~~~~ | ; egaleoglindit.cpp:26:25: warning: statement has no effect [-Wunused-value] 26 | cout "NU"; | ^~~~ egaleoglindit.cpp:29:34: error: expected ‘;’ at end of input 29 | 3 | ^ | ; egaleoglindit.cpp:29:33: warning: statement has no effect [-Wunused-value] 29 | 3 | ^ egaleoglindit.cpp:29:34: error: expected ‘}’ at end of input 29 | 3 | ^ egaleoglindit.cpp:5:1: note: to match this ‘{’ 5 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema EgaleOglindit 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ă.