#3146
Să se sorteze șirul după criteriile specificate.
| Problema | Sort4 | Operații I/O |
sort4.in/sort4.out
|
|---|---|---|---|
| Limita timp | 0.37 secunde | Limita memorie |
Total: 37 MB
/
Stivă 37 MB
|
| Id soluție | #64197905 | Utilizator | |
| Fișier | sort4.cpp | Dimensiune | 1.89 KB |
| Data încărcării | 22 Aprilie 2026, 15:32 | Scor/rezultat | Eroare de compilare |
sort4.cpp: In function ‘void proceseaza(Numar&)’: sort4.cpp:25:13: error: ‘frecv’ was not declared in this scope 25 | if (frecv[cifra] == 0) { | ^~~~~ sort4.cpp:26:13: error: ‘distincte’ was not declared in this scope 26 | distincte++; | ^~~~~~~~~ sort4.cpp:30:9: error: ‘s’ was not declared in this scope 30 | s += cifra; | ^ sort4.cpp:31:9: error: ‘p’ was not declared in this scope 31 | p *= cifra; | ^ sort4.cpp:35:23: error: ‘distincte’ was not declared in this scope 35 | x.cif_distincte = distincte; | ^~~~~~~~~ sort4.cpp:36:14: error: ‘s’ was not declared in this scope 36 | x.suma = s; | ^ sort4.cpp:37:16: error: ‘p’ was not declared in this scope 37 | x.produs = p; | ^ sort4.cpp:41:49: error: a function-definition is not allowed here before ‘{’ token 41 | bool comparator(const Numar &a, const Numar &b) { | ^ sort4.cpp:58:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 58 | int main() { | ^~ sort4.cpp:58:9: note: remove parentheses to default-initialize a variable 58 | int main() { | ^~ | -- sort4.cpp:58:9: note: or replace parentheses with braces to value-initialize a variable sort4.cpp:58:12: error: a function-definition is not allowed here before ‘{’ token 58 | int main() { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sort4 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ă.