#1151
VerifEgaleDivImp
Se dă un vector cu n
elemente numere naturale. Folosind metoda Divide et Impera să se verifice dacă toate elementele vectorului sunt egale.
Problema | VerifEgaleDivImp | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50098742 | Utilizator | |
Fișier | verifegaledivimp.cpp | Dimensiune | 365 B |
Data încărcării | 27 Martie 2024, 08:27 | Scor / rezultat | Eroare de compilare |
verifegaledivimp.cpp: In function 'void dei(int, int)': verifegaledivimp.cpp:9:8: error: return-statement with a value, in function returning 'void' [-fpermissive] return 1; ^ verifegaledivimp.cpp:10:14: error: return-statement with a value, in function returning 'void' [-fpermissive] else return -1; ^ verifegaledivimp.cpp:12:30: error: invalid operands of types 'void' and 'void' to binary 'operator*' return dei(s,m)*dei(m+1,d);} ^ verifegaledivimp.cpp:12:30: error: return-statement with a value, in function returning 'void' [-fpermissive] verifegaledivimp.cpp:6:6: warning: unused variable 'k' [-Wunused-variable] {int k=0; ^ verifegaledivimp.cpp: In function 'int main()': verifegaledivimp.cpp:17:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ verifegaledivimp.cpp:19:17: error: invalid operands of types 'void' and 'int' to binary 'operator>' if(dei(1,n)>0) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifEgaleDivImp 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ă.