Detalii evaluare #57477801

Rezumat problemă

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.

Detalii

Problema intersecSets Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #57477801 Utilizator Bortas Annamaria (Annamaria_Bortas)
Fișier intersecsets.cpp Dimensiune 345 B
Data încărcării 01 Aprilie 2025, 18:26 Scor / rezultat 0 puncte

Evaluare

Mesaj compilare

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;

              ^

Rezultat evaluare

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

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema intersecSets face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.

Du-te sus!