#530
Multimi1
Se dau două mulțimi de numere naturale. Să se afișeze reuniunea și intersecția lor.
Problema | Multimi1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58530491 | Utilizator | |
Fișier | multimi1.cpp | Dimensiune | 960 B |
Data încărcării | 14 Iunie 2025, 22:17 | Scor / rezultat | Eroare de compilare |
multimi1.cpp: In function 'int main()': multimi1.cpp:5:75: error: expected initializer before 'i' int n, a[100000], m, b[100000], intersectie[200000], reuniune[200000] i, j, p, k; ^ multimi1.cpp:7:10: error: 'i' was not declared in this scope for (i=0; i<n; i++) ^ multimi1.cpp:10:10: error: 'j' was not declared in this scope for (j=0; j<m; j++) ^ multimi1.cpp:12:5: error: 'i' was not declared in this scope i=0; ^ multimi1.cpp:13:5: error: 'j' was not declared in this scope j=0; ^ multimi1.cpp:14:5: error: 'p' was not declared in this scope p=0; ^ multimi1.cpp:33:14: error: 'reuniune' was not declared in this scope reuniune[x++]=a[i++]; ^ multimi1.cpp:33:23: error: 'x' was not declared in this scope reuniune[x++]=a[i++]; ^ multimi1.cpp:35:14: error: 'reuniune' was not declared in this scope reuniune[x++]=b[j++]; ^ multimi1.cpp:35:23: error: 'x' was not declared in this scope reuniune[x++]=b[j++]; ^ multimi1.cpp:37:11: error: 'reuniune' was not declared in this scope reuniune[x++]=a[i++]; ^ multimi1.cpp:37:20: error: 'x' was not declared in this scope reuniune[x++]=a[i++]; ^ multimi1.cpp:39:11: error: 'reuniune' was not declared in this scope reuniune[x++]=b[j++]; ^ multimi1.cpp:39:20: error: 'x' was not declared in this scope reuniune[x++]=b[j++]; ^ multimi1.cpp:40:10: error: 'k' was not declared in this scope for (k=0; k<x; k++) ^ multimi1.cpp:40:17: error: 'x' was not declared in this scope for (k=0; k<x; k++) ^ multimi1.cpp:41:15: error: 'reuniune' was not declared in this scope cout<<reuniune[k]<<" "; ^ multimi1.cpp:43:10: error: 'k' was not declared in this scope for (k=0; k<p; k++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Multimi1 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ă.