#528
Multimi
Se dau două mulțimi de numere naturale. Să se afișeze reuniunea și intersecția lor.
Problema | Multimi | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54716110 | Utilizator | |
Fișier | multimi.cpp | Dimensiune | 929 B |
Data încărcării | 06 Decembrie 2024, 09:50 | Scor / rezultat | Eroare de compilare |
multimi.cpp: In function 'int main()': multimi.cpp:8:59: error: conflicting declaration 'int b' int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:8:18: error: 'b' has a previous declaration as 'int b [1001]' int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:15:29: error: 'r' was not declared in this scope for(int i=1; i<=n; ++i) r[i]=a[i]; ^ multimi.cpp:19:57: error: 'r' was not declared in this scope for(int i=1; i<=k; ++i) if(r[i]==b[j]) ok=true; ^ multimi.cpp:21:39: error: 'r' was not declared in this scope r[k]=b[j];} ^ multimi.cpp:23:40: error: 'r' was not declared in this scope for(int i=1; i<=k; i++) cout<<sort(r+1, r+k+1); ^ multimi.cpp:23:50: error: 'sort' was not declared in this scope for(int i=1; i<=k; i++) cout<<sort(r+1, r+k+1); ^ multimi.cpp:29:38: error: 't' was not declared in this scope t[k]=a[i];} ^ multimi.cpp:31:35: error: 't' was not declared in this scope for(int i=1; i<=k; i++) cout<<t[i]; ^ multimi.cpp:35:1: error: expected '}' at end of input } ^ multimi.cpp:8:35: warning: unused variable 'uc' [-Wunused-variable] int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:8:39: warning: unused variable 'aux' [-Wunused-variable] int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:8:44: warning: unused variable 'c' [-Wunused-variable] int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:8:49: warning: unused variable 'x' [-Wunused-variable] int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:8:52: warning: unused variable 'bombo' [-Wunused-variable] int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:8:62: warning: unused variable 'j' [-Wunused-variable] int a[1001], b[1001], n, k=0, uc, aux, c=0, x, bombo, b, j, m; ^ multimi.cpp:35:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Multimi 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ă.