Создайте web-страницу, при открытии которой в браузере будет отображаться ваши имя и фамилия
231
476
Ответы на вопрос:
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <iomanip>
#include <map>
using namespace std;
//#define int long long
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
int mx = -INT_MAX,cnt=0,ans=1;
for(int i = 0; i < n; i++)
{
int k;
cin >> k;
if(i < n/2)
mx = max(mx,k);
if(k < 0)
{
ans *= k;
cnt++;
}
}
cout << "maximal element in first half: " << mx << "\n";
cout << "product of negative numbers: " << ans << "\n";
cout << "amount of negative numbers: " << cnt;
}
Популярно: Информатика
-
bodiafan21.03.2023 18:50
-
xeniyaforevermailru26.09.2022 18:11
-
DiroL2127.06.2023 19:38
-
АннаФайна01.09.2020 21:34
-
Bagdan11215.06.2022 07:20
-
AnnLage23.05.2023 16:02
-
Aliona20003.01.2021 18:08
-
русляккисляк22.02.2022 13:37
-
melisonpolina26.02.2021 00:16
-
чурка282920.12.2021 18:40