3801 | 2023-03-03 08:23:27 | kohumark | Irány a döntő | cpp17 | Accepted 100/100 | 3ms | 3672 KiB |
#include <iostream>
using namespace std;
int main(){
cin.tie(0); ios_base::sync_with_stdio(0);
int n,p; cin >> n >> p;
int d=0; int m=0;
for(int i=0; i<n; i++){
int a,b,c;
cin >> a >> b >> c;
if(a+b+c>d) d=a+b+c;
else if(a+b+c>m) m=a+b+c;
}
if(m+p*100+1-d>0) cout << m+p*100+1-d;
else cout << '0';
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1892 KiB | ||||
2 | Accepted | 3ms | 2120 KiB | ||||
subtask2 | 50/50 | ||||||
3 | Accepted | 3ms | 2348 KiB | ||||
4 | Accepted | 2ms | 2560 KiB | ||||
5 | Accepted | 2ms | 2764 KiB | ||||
6 | Accepted | 3ms | 2992 KiB | ||||
subtask3 | 50/50 | ||||||
7 | Accepted | 2ms | 3060 KiB | ||||
8 | Accepted | 2ms | 3024 KiB | ||||
9 | Accepted | 3ms | 3140 KiB | ||||
10 | Accepted | 3ms | 3368 KiB | ||||
11 | Accepted | 3ms | 3580 KiB | ||||
12 | Accepted | 2ms | 3672 KiB |