#2126
NrMaxInterv
Se consideră n
intervale de numere întregi [A
i
, B
i
]
, 1≤i≤n
. Să se determine numărul maxim de intervale care se suprapun (au cel puțin o valoare comună).
din folclor
Problema | NrMaxInterv | Operații I/O |
nrmaxinterv.in /nrmaxinterv.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 2 MB
|
Id soluție | #22916649 | Utilizator | |
Fișier | nrmaxinterv.cpp | Dimensiune | 823 B |
Data încărcării | 12 Mai 2020, 17:56 | Scor / rezultat | Eroare de compilare |
nrmaxinterv.cpp: In function 'int main()': nrmaxinterv.cpp:11:16: error: size of array 'a' has non-integral type 'float' float a[n+1],b[n+1]; ^ nrmaxinterv.cpp:11:23: error: size of array 'b' has non-integral type 'float' float a[n+1],b[n+1]; ^ nrmaxinterv.cpp:13:15: error: invalid types 'float [1][float]' for array subscript f>>a[i]>>b[i]; ^ nrmaxinterv.cpp:13:21: error: invalid types 'float [1][float]' for array subscript f>>a[i]>>b[i]; ^ nrmaxinterv.cpp:17:20: error: invalid types 'float [1][float]' for array subscript if((a[i]>a[j])||(a[i]==a[j]&&b[i]>b[j])) ^ nrmaxinterv.cpp:17:25: error: invalid types 'float [1][float]' for array subscript if((a[i]>a[j])||(a[i]==a[j]&&b[i]>b[j])) ^ nrmaxinterv.cpp:17:33: error: invalid types 'float [1][float]' for array subscript if((a[i]>a[j])||(a[i]==a[j]&&b[i]>b[j])) ^ nrmaxinterv.cpp:17:39: error: invalid types 'float [1][float]' for array subscript if((a[i]>a[j])||(a[i]==a[j]&&b[i]>b[j])) ^ nrmaxinterv.cpp:17:45: error: invalid types 'float [1][float]' for array subscript if((a[i]>a[j])||(a[i]==a[j]&&b[i]>b[j])) ^ nrmaxinterv.cpp:17:50: error: invalid types 'float [1][float]' for array subscript if((a[i]>a[j])||(a[i]==a[j]&&b[i]>b[j])) ^ nrmaxinterv.cpp:19:28: error: invalid types 'float [1][float]' for array subscript aux=a[i]; ^ nrmaxinterv.cpp:20:24: error: invalid types 'float [1][float]' for array subscript a[i]=a[j]; ^ nrmaxinterv.cpp:20:29: error: invalid types 'float [1][float]' for array subscript a[i]=a[j]; ^ nrmaxinterv.cpp:21:24: error: invalid types 'float [1][float]' for array subscript a[j]=aux; ^ nrmaxinterv.cpp:22:29: error: invalid types 'float [1][float]' for array subscript aux1=b[i]; ^ nrmaxinterv.cpp:23:24: error: invalid types 'float [1][float]' for array subscript b[i]=b[j]; ^ nrmaxinterv.cpp:23:29: error: invalid types 'float [1][float]' for array subscript b[i]=b[j]; ^ nrmaxinterv.cpp:24:24: error: invalid types 'float [1][float]' for array subscript b[j]=aux1; ^ nrmaxinterv.cpp:28:19: error: invalid types 'float [1][float]' for array subscript if(max(a[i],a[i+1])<=min(b[i],b[i+1])) ^ nrmaxinterv.cpp:28:26: error: invalid types 'float [1][float]' for array subscript if(max(a[i],a[i+1])<=min(b[i],b[i+1])) ^ nrmaxinterv.cpp:28:37: error: invalid types 'float [1][float]' for array subscript if(max(a[i],a[i+1])<=min(b[i],b[i+1])) ^ nrmaxinterv.cpp:28:44: error: invalid types 'float [1][float]' for array subscript if(max(a[i],a[i+1])<=min(b[i],b[i+1])) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrMaxInterv 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ă.