#263
Se dau n intervale [a,b], unde a şi b sunt numere întregi. Să se determine intervalul rezultat prin intersectarea intervalelor date.
| Problema | Intervale2 | Operații I/O |
intervale2.in/intervale2.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64416139 | Utilizator | |
| Fișier | intervale2.cpp | Dimensiune | 511 B |
| Data încărcării | 05 Mai 2026, 21:18 | Scor/rezultat | 80 puncte |
intervale2.cpp: In function ‘int main()’: intervale2.cpp:9:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(int i=1;i<=n;i++) | ^~~ intervale2.cpp:12:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | ma=a[1][1]; | ^~ intervale2.cpp:13:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 13 | for(int i=1;i<=n;i++) | ^~~ intervale2.cpp:16:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 16 | mi=a[1][2]; | ^~ intervale2.cpp:22:1: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 22 | else | ^~~~ intervale2.cpp:24:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 24 | return 0; | ^~~~~~ intervale2.cpp:16:18: warning: array subscript 2 is above array bounds of ‘int [2]’ [-Warray-bounds=] 16 | mi=a[1][2]; | ~~~~~~^ intervale2.cpp:6:8: note: while referencing ‘a’ 6 | int n, a[101][2],ma,mi; | ^ intervale2.cpp:18:18: warning: array subscript 2 is above array bounds of ‘int [2]’ [-Warray-bounds=] 18 | if(a[i][2]<mi) | ~~~~~~^ intervale2.cpp:6:8: note: while referencing ‘a’ 6 | int n, a[101][2],ma,mi; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | OK. | 20 | 20 | ||
| 3 | 0.002 secunde | OK. | 20 | 20 | ||
| 4 | 0.001 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 80 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Intervale2 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ă.