66242023-12-13 12:14:11GhostIrány a döntőcpp17Wrong answer 0/1003ms3228 KiB
#include <iostream>


using namespace std;

int main()
{
    int n, p, i, temp, pontunk = 0, max = -1, out = 0;
    cin >> n >> p;
    for (i = 0; i < 3; i++) {
        cin >> temp;
        pontunk += temp;
    }
    for (i = 1; i < p; i++) {
        int ossz = 0;
        for (int j = 0; j < 3; j++) {
            cin >> temp;
            ossz += temp;
        }
        if (max < ossz) {
            max = ossz;
        }
    }
    max += p * 100;
    if ((pontunk - max) < 0) {
        out = abs(pontunk - max);
    }
    cout << out;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1880 KiB
2Accepted3ms2116 KiB
subtask20/50
3Wrong answer3ms2332 KiB
4Wrong answer3ms2564 KiB
5Wrong answer3ms2756 KiB
6Accepted3ms2848 KiB
subtask30/50
7Wrong answer3ms2900 KiB
8Wrong answer3ms2888 KiB
9Wrong answer3ms3020 KiB
10Accepted3ms3096 KiB
11Wrong answer3ms3104 KiB
12Wrong answer3ms3228 KiB