O(NlogN) Rand() funksiyasidan foydalanish uchun Ctime header fayli chaqiriladi
'False'.
Quyidagi dastur natijasini aniqlang
int funk(int *a, int l, int r)
{
int x1, x2;
if (l == r)
return a[l]; else
{
x1 = funk(a, l, (l + r)/2); x2 = funk(a, (l + r)/2 + 1, r);
return x1 > x2 ? x1 : x2;
}
}
int main()
{
int a[]={2,7,7,5,6,5,4,3,6,7,8};
cout<}
7 Quyidagi dastur kodini tahlil qiling:
char combination[]={'a','b','c'};
void generate(int m)
{
int n, i;
if (m+1 > m_max)
{
for (i=0; icout<cout<}
else
for (n=0; nif (m == 0||n > m-1)
{
combination[m] = combination[n];
generate(m + 1);
};};
Select one:
{a,b,c} hosil qilish masalasining dastur kodi Quyidagi dastur natijasini aniqlang
int funk(int *a, int l, int r)
{
int x1, x2;
if (l == r)
return a[l]; else
{
x1 = funk(a, l, (l + r)/2); x2 = funk(a, (l + r)/2 + 1, r);
return x1 > x2 ? x1 : x2;
}
}
int main()
{
int a[]={2,9,7,5,6};
cout<}
9 srand(seed) funksiyasida seedning qiymati dastlabki holatda nimaga teng?
Select one or more:
1 ga
Biror chekli to’plam elementlari ichida ma’lum bir xossaga ega bo’lgan elementlaridan iborat qism to’plamlarni tanlab olish yoki to’plam elementlarini ma’lum bir tartibda joylashtirish bilan bog’liq masalalar Answer(aaaaa masalalar)