#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 | #62123742 | Utilizator | |
| Fișier | irdds.cpp | Dimensiune | 2.33 KB |
| Data încărcării | 09 Ianuarie 2026, 19:48 | Scor/rezultat | 100 puncte |
irdds.cpp: In function 'std::vector<int> intersectie(std::vector<int>&, std::vector<int>&)': irdds.cpp:7:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0, j = 0; i < a.size() && j < b.size(); ) { ^ irdds.cpp:7:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0, j = 0; i < a.size() && j < b.size(); ) { ^ irdds.cpp: In function 'std::vector<int> reuniune(std::vector<int>&, std::vector<int>&)': irdds.cpp:21:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0, j = 0; i < a.size() || j < b.size(); ) { ^ irdds.cpp:21:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0, j = 0; i < a.size() || j < b.size(); ) { ^ irdds.cpp:22:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i >= a.size()) c.push_back(b[j++]); ^ irdds.cpp:23:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (j >= b.size()) c.push_back(a[i++]); ^ irdds.cpp: In function 'std::vector<int> diferenta(std::vector<int>&, std::vector<int>&)': irdds.cpp:36:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0, j = 0; i < a.size(); ) { ^ irdds.cpp:37:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (j >= b.size() || a[i] < b[j]) { ^ irdds.cpp: In function 'std::vector<int> diferenta_simetrica(std::vector<int>&, std::vector<int>&)': irdds.cpp:51:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0, j = 0; i < a.size() || j < b.size(); ) { ^ irdds.cpp:51:55: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0, j = 0; i < a.size() || j < b.size(); ) { ^ irdds.cpp:52:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (i >= a.size()) c.push_back(b[j++]); ^ irdds.cpp:53:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (j >= b.size()) c.push_back(a[i++]); ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.096 secunde | OK. | 10 | 10 | ||
| 2 | 0.092 secunde | OK. | 10 | 10 | ||
| 3 | 0.064 secunde | OK. | 10 | 10 | ||
| 4 | 0.064 secunde | OK. | 10 | 10 | ||
| 5 | 0.096 secunde | OK. | 10 | 10 | ||
| 6 | 0.08 secunde | OK. | 10 | 10 | ||
| 7 | 0.12 secunde | OK. | 10 | 10 | ||
| 8 | 0.088 secunde | OK. | 10 | 10 | ||
| 9 | 0.048 secunde | OK. | 10 | 10 | ||
| 10 | 0.12 secunde | OK. | 10 | 10 | ||
| Punctaj total | 100 | |||||
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ă.