Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
1.8 kB
1
Indexable
Never
#include <algorithm>
#include <iostream>
using namespace std;

int main()
{
	/*
	int n;
	cin >> n;
	int mas[100] {0};
	int s = 0;
	for (int i = 0; i < n; i++)
	{
		cin >> mas[i];
		s += mas[i];
	}
	cout << (float)(s) / n;
	return 0;
	*/
	/*
	int n;
	cin >> n;
	double mas[100];
	for (int i = 0; i < n; i++){
		cin >> mas[i];
	}
	std::sort(mas, mas + n);
	int y = 0;
	for (int i = 0; i < n; i++) {
		if (mas[i] < 51)
		{
			y++;
		}
	}
	int h =(int)((n - y) / 2);
	double a = 0;
	int max = INT32_MIN;
	for (int i = 0; i < h; i++)
	{
		if (mas[i] > 50)
		{
			if (max < mas[i])
			{
				max = mas[i];
			}
			mas[i] = (double)(mas[i] * 0.75);
			a += (double)mas[i];
		}
		if (mas[i] < 51)
		{
			h++;
		}
	}
	if (a - (int)a > 0)
	{
		a = ((int)a) + 1;
	}
	double yu = 0;
	for (int i = 0; i < n; i++)
	{
		yu += mas[i];
	}
	if (yu - (int)yu > 0)
	{
		yu = (int)yu + 1;
	}
	cout << yu << " " << max;
	return 0;
	*/
	/*
	int mas[100];
	int a = 0;
	int b = 0;
	int i = 0;
	for (i; i < 100; i++){
		cin >> mas[i];
		if (mas[i] == 0)
			a++;
		if (mas[i] == 1)
			b++;
		if (mas[i] == -1)
			break;
	}
	cout << a << " " << b << " ";
	if (i % 2 == 0){
		cout << mas[(i / 2) - 1] + mas[(i / 2)];
	}
	if (i % 2 != 0){
		cout << mas[((int)i / 2)];
	}
	return 0;
	*/
	/*
	int k;
	cin >> k;
	int mas[100];
	for (int i = 0; i < k; i++)
	{
		cin >> mas[i];
	}
	sort(mas, mas + k);
	for (int i = 0; i < k; i++)
	{
		if (mas[i] != (i + 1))
		{
			cout << i + 1;
			return 0;
		}
	}
	return 0;
	*/
	/*
	int n, l, a;
	cin >> n >> l >> a;
	int mas[1000];
	int h2 = 0;
	for (int i = 0; i < n; i++)
	{
		cin >> mas[i];
		h2 += mas[i];
	}
	cout << a + (h2 % l);
	return 0;
	*/
}
Leave a Comment