#3974
Se dau 2 mulţimi de numere naturale. Să se afișeze mulţimea rezultată în urma efectuării unei operații.
| Problema | IRDDS | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 8 MB
/
Stivă 4 MB
|
| Id soluție | #61398022 | Utilizator | |
| Fișier | irdds.cpp | Dimensiune | 1.21 KB |
| Data încărcării | 26 Noiembrie 2025, 15:49 | Scor/rezultat | Eroare de compilare |
irdds.cpp: In function 'void reuniune(int*, int*, int*, int, int, int&)': irdds.cpp:15:13: error: 'cout' was not declared in this scope cout<<a[i]<<" ";j++; ^ irdds.cpp:15:13: note: suggested alternative: In file included from irdds.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ irdds.cpp:19:13: error: 'cout' was not declared in this scope cout<<n[j]<<" ";j++; ^ irdds.cpp:19:13: note: suggested alternative: In file included from irdds.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ irdds.cpp:19:22: error: invalid types 'int[int]' for array subscript cout<<n[j]<<" ";j++; ^ irdds.cpp:23:13: error: 'cout' was not declared in this scope cout<<a[i]<<" "; ^ irdds.cpp:23:13: note: suggested alternative: In file included from irdds.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ irdds.cpp:28:9: error: declaration of 'int n' shadows a parameter int n,m; ^ irdds.cpp:28:11: error: declaration of 'int m' shadows a parameter int n,m; ^ irdds.cpp:29:14: error: declaration of 'int a [200000]' shadows a parameter int a[DIM],b[DIM]; ^ irdds.cpp:29:21: error: declaration of 'int b [200000]' shadows a parameter int a[DIM],b[DIM]; ^ irdds.cpp:30:10: error: declaration of 'char c' shadows a parameter char c; ^ irdds.cpp:31:5: error: 'cin' was not declared in this scope cin>>n>>m>>c; ^ irdds.cpp:31:5: note: suggested alternative: In file included from irdds.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ irdds.cpp:33:13: error: expected primary-expression before '?' token cin???a[i]; ^ irdds.cpp:33:14: error: expected primary-expression before '?' token cin???a[i]; ^ irdds.cpp:33:19: error: expected ':' before ';' token cin???a[i]; ^ irdds.cpp:33:19: error: expected primary-expression before ';' token irdds.cpp:33:19: error: expected ':' before ';' token irdds.cpp:33:19: error: expected primary-expression before ';' token irdds.cpp:33:19: error: expected ':' before ';' token irdds.cpp:33:19: error: expected primary-expression before ';' token irdds.cpp:39:29: error: invalid conversion from 'int' to 'int*' [-fpermissive] reuniune(a,b,m,n); ^ irdds.cpp:39:29: error: too few arguments to function 'void reuniune(int*, int*, int*, int, int, int&)' irdds.cpp:3:7: note: declared here void reuniune(int a[],int b[], int c[], int n, int m, int&k) ^ irdds.cpp:41:17: error: 'cout' was not declared in this scope cout<<r[i]<<" "; ^ irdds.cpp:41:17: note: suggested alternative: In file included from irdds.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ irdds.cpp:41:23: error: 'r' was not declared in this scope cout<<r[i]<<" "; ^ irdds.cpp:50:22: error: invalid types 'char[int]' for array subscript c[k++]=a[i++]; ^ irdds.cpp:52:18: error: invalid types 'char[int]' for array subscript c[k++]=b[j++]; ^ irdds.cpp:53:23: error: invalid types 'char[int]' for array subscript else{c[k++]=a[i]; ^ irdds.cpp:60:16: error: 'cout' was not declared in this scope cout<<a[i]<<" ";i++; ^ irdds.cpp:60:16: note: suggested alternative: In file included from irdds.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ irdds.cpp:64:17: error: 'cout' was not declared in this scope cout<<b[j]<<" ",j++; ^ irdds.cpp:64:17: note: suggested alternative: In file included from irdds.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ irdds.cpp:69:12: error: return-statement with a value, in function returning 'void' [-fpermissive] return 0; ^ irdds.cpp:69:13: error: expected '}' at end of input return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema IRDDS 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ă.