66222023-12-13 11:49:18GervidIrány a döntőcpp17Accepted 100/1003ms3044 KiB
#include <iostream>

using namespace std;

int main()
{
    int n, p, i, j, max = 0, current, temp, points = 0;
    cin >> n >> p;

	for (j = 0; j < 3; j++)
	{
		cin >> temp;
		points += temp;
	}

	for (i = 1; i < n; i++)
	{
		current = 0;
		for (j = 0; j < 3; j++)
		{
			cin >> temp;
			current += temp;
		}

		if (max < current)
		{
			max = current;
		}
	}

	if (100 * p + max - points + 1 > 0)
	{
		cout << 100 * p + max - points + 1;
	}
	else
	{
		cout << 0;
	}
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2116 KiB
subtask250/50
3Accepted3ms2444 KiB
4Accepted3ms2440 KiB
5Accepted3ms2796 KiB
6Accepted3ms2656 KiB
subtask350/50
7Accepted3ms2720 KiB
8Accepted3ms2852 KiB
9Accepted3ms2996 KiB
10Accepted3ms3036 KiB
11Accepted3ms3044 KiB
12Accepted3ms3044 KiB