6622 | 2023-12-13 11:49:18 | Gervid | Irány a döntő | cpp17 | Accepted 100/100 | 3ms | 3044 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;
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2116 KiB | ||||
subtask2 | 50/50 | ||||||
3 | Accepted | 3ms | 2444 KiB | ||||
4 | Accepted | 3ms | 2440 KiB | ||||
5 | Accepted | 3ms | 2796 KiB | ||||
6 | Accepted | 3ms | 2656 KiB | ||||
subtask3 | 50/50 | ||||||
7 | Accepted | 3ms | 2720 KiB | ||||
8 | Accepted | 3ms | 2852 KiB | ||||
9 | Accepted | 3ms | 2996 KiB | ||||
10 | Accepted | 3ms | 3036 KiB | ||||
11 | Accepted | 3ms | 3044 KiB | ||||
12 | Accepted | 3ms | 3044 KiB |