欧美free性护士vide0shd,老熟女,一区二区三区,久久久久夜夜夜精品国产,久久久久久综合网天天,欧美成人护士h版

目錄

柚子快報(bào)邀請(qǐng)碼778899分享:算法 藍(lán)橋杯24省c

柚子快報(bào)邀請(qǐng)碼778899分享:算法 藍(lán)橋杯24省c

http://yzkb.51969.com/

#include

using namespace std;

int const N = 200005;

int n;

long long t;

int ans = 0;

int main()

{

cin >> n;

for (int i = 1;i <= n;i++)

{

cin >> t;

long long test = 2;

bool flag = 0;

if (t == 1)

{

ans++;

}

while (test <= t)

{

if (test == t)

{

flag = 1;

break;

}

test *= 2;

}

if(flag==1)ans++;

}

cout << ans << endl;

return 0;

}

#include

#include

#include

using namespace std;

int n;

struct num

{

int nums;

int cirs = 0;

};

vectorv;

bool cmp(num num1, num num2)

{

if (num1.cirs == num2.cirs)

{

return num1.nums < num2.nums;

}

return num1.cirs < num2.cirs;

}

int main()

{

cin >> n;

int t;

num nu;

for (int i = 1;i <= n;i++)

{

cin >> t;

nu.cirs = 0;

nu.nums = t;

while (t)

{

int x = t % 10;

if (x == 8)

{

nu.cirs += 2;

}

else if (x == 0 || x == 9 || x == 6 || x == 4)

{

nu.cirs += 1;

}

t /= 10;

}

v.push_back(nu);

}

sort(v.begin(), v.end(), cmp);

for (vector::iterator it = v.begin();it != v.end();it++)

{

cout << (*it).nums << " ";

}

return 0;

}

#include

#include

using namespace std;

int n;

int arr[1000005];

int a[500005];

long long ans = 0;

int main()

{

cin >> n;

for (int i = 1;i <= n;i++)

{

cin >> arr[i];

}

for (int i = 1;i <= n / 2;i++)

{

a[i] = arr[n - i + 1] - arr[i];

}

for (int i = 1;i <= n / 2;i++)

{

if (a[i] > 0)

{

if (a[i + 1] >= a[i])

{

a[i + 1] -= a[i];

}

else if (a[i + 1] >= 0)

{

a[i + 1] = 0;

}

ans += a[i];

}

else if (a[i] < 0)

{

if (a[i + 1] <= a[i])

{

a[i + 1] -= a[i];

}

else if (a[i + 1] < 0)

{

a[i + 1] = 0;

}

ans -= a[i];

}

}

cout << ans << endl;

return 0;

}

?

#include

using namespace std;

int const N = 3e5 + 5;

int n, m, l[N], r[N],a[N],s[N],sum=0;

int main()

{

cin >> n >> m;

for (int i = 1;i <= m;i++)

{

cin >> l[i] >> r[i];

a[l[i]]++;

a[r[i]+1]--;

}

for (int i = 1;i <= n;i++)

{

a[i] += a[i - 1];

if (a[i] == 0)sum++;

s[i] = s[i - 1] + (a[i] == 1);

}

for (int i = 1;i <= m;i++)

{

cout << s[r[i]] - s[l[i]-1] + sum << endl;

}

return 0;

}

?

?

柚子快報(bào)邀請(qǐng)碼778899分享:算法 藍(lán)橋杯24省c

http://yzkb.51969.com/

好文閱讀

評(píng)論可見(jiàn),查看隱藏內(nèi)容

本文內(nèi)容根據(jù)網(wǎng)絡(luò)資料整理,出于傳遞更多信息之目的,不代表金鑰匙跨境贊同其觀點(diǎn)和立場(chǎng)。

轉(zhuǎn)載請(qǐng)注明,如有侵權(quán),聯(lián)系刪除。

本文鏈接:http://gantiao.com.cn/post/19523085.html

發(fā)布評(píng)論

您暫未設(shè)置收款碼

請(qǐng)?jiān)谥黝}配置——文章設(shè)置里上傳

掃描二維碼手機(jī)訪問(wèn)

文章目錄