#186
Se citește de la tastură un număr natural n, apoi n numere naturale. Să se afişeze cel mai mic număr care poate fi scris folosind cifra minimă a fiecărui număr citit.
| Problema | CifMin | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64510147 | Utilizator | |
| Fișier | cifmin.cpp | Dimensiune | 1.86 KB |
| Data încărcării | 11 Mai 2026, 21:08 | Scor/rezultat | Eroare de compilare |
cifmin.cpp:59:11: error: redefinition of ‘long long int n’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:5:11: note: ‘long long int n’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:59:14: error: redefinition of ‘long long int v [1001]’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:5:14: note: ‘long long int v [1001]’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:59:23: error: redefinition of ‘long long int i’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:5:23: note: ‘long long int i’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:59:26: error: redefinition of ‘long long int h [1001]’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:5:26: note: ‘long long int h [1001]’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:59:35: error: redefinition of ‘long long int k’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:5:35: note: ‘long long int k’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:59:38: error: redefinition of ‘long long int x’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:5:38: note: ‘long long int x’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:59:41: error: redefinition of ‘long long int minim’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~~~ cifmin.cpp:5:41: note: ‘long long int minim’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~~~ cifmin.cpp:59:48: error: redefinition of ‘long long int sortat’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~~~~ cifmin.cpp:5:48: note: ‘long long int sortat’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~~~~ cifmin.cpp:59:56: error: redefinition of ‘long long int aux’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~ cifmin.cpp:5:56: note: ‘long long int aux’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~ cifmin.cpp:59:61: error: redefinition of ‘long long int MIN’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~ cifmin.cpp:5:61: note: ‘long long int MIN’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^~~ cifmin.cpp:59:66: error: redefinition of ‘long long int g’ 59 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:5:66: note: ‘long long int g’ previously declared here 5 | long long n, v[1001], i, h[1001], k, x, minim, sortat, aux, MIN, g; | ^ cifmin.cpp:60:20: error: redefinition of ‘long long unsigned int p’ 60 | unsigned long long p; | ^ cifmin.cpp:6:20: note: ‘long long unsigned int p’ previously declared here 6 | unsigned long long p; | ^ cifmin.cpp:61:5: error: redefinition of ‘int main()’ 61 | int main() | ^~~~ cifmin.cpp:7:5: note: ‘int main()’ previously defined here 7 | int main() | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifMin 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ă.