#4520
Se dau două mulțimi de numere naturale care au doar numere naturale consecutive. Deci putem să definim fiecare din cele două mulțimi prin capetele lor. De exemplu, mulțimea {6,7,8,9,10,11,12}
poate fi dată doar prin capetele 6
și 12
. Dându-se două mulțimi de numere naturale consecutive prin capetele lor, să se determine intersecția lor.
Problema | intersecSets | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57477801 | Utilizator | |
Fișier | intersecsets.cpp | Dimensiune | 345 B |
Data încărcării | 01 Aprilie 2025, 18:26 | Scor / rezultat | 0 puncte |
intersecsets.cpp: In function 'int main()': intersecsets.cpp:9:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (a < c < d < b) ^ intersecsets.cpp:9:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (a < c < d < b) ^ intersecsets.cpp:10:22: warning: right operand of comma operator has no effect [-Wunused-value] m = c, '\n', d; ^ intersecsets.cpp:10:23: warning: right operand of comma operator has no effect [-Wunused-value] m = c, '\n', d; ^ intersecsets.cpp:11:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (a < c < b < d) ^ intersecsets.cpp:11:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (a < c < b < d) ^ intersecsets.cpp:12:22: warning: right operand of comma operator has no effect [-Wunused-value] m = c, '\n', b; ^ intersecsets.cpp:12:23: warning: right operand of comma operator has no effect [-Wunused-value] m = c, '\n', b; ^ intersecsets.cpp:13:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (c < a < b < d) ^ intersecsets.cpp:13:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (c < a < b < d) ^ intersecsets.cpp:14:22: warning: right operand of comma operator has no effect [-Wunused-value] m = a, '\n', b; ^ intersecsets.cpp:14:23: warning: right operand of comma operator has no effect [-Wunused-value] m = a, '\n', b; ^ intersecsets.cpp:15:11: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (c < a < d < b) ^ intersecsets.cpp:15:15: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses] if (c < a < d < b) ^ intersecsets.cpp:16:22: warning: right operand of comma operator has no effect [-Wunused-value] m = a, '\n', d; ^ intersecsets.cpp:16:23: warning: right operand of comma operator has no effect [-Wunused-value] m = a, '\n', d; ^ intersecsets.cpp:17:14: warning: 'm' may be used uninitialized in this function [-Wmaybe-uninitialized] cout << m; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema intersecSets 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ă.