# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
275905 |
2020-08-20T08:19:58 Z |
임성재(#5103) |
Radio (Balkan15_RADIO) |
C++17 |
|
1 ms |
384 KB |
#include<bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(false); cin.tie(0);
#define fi first
#define se second
#define em emplace
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define mp make_pair
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int inf = 1e9;
const ll INF = 1e18;
int n, k;
int x[100010], p[100010], s[100010];
vector<int> v1, v2;
int main() {
fast;
cin >> n >> k;
for(int i=1; i<=n; i++) {
cin >> x[i] >> p[i] >> s[i];
v1.eb(x[i] + p[i]);
v2.eb(x[i] - p[i]);
}
sort(all(v1));
sort(all(v2));
int l = v1.front();
int r = v2.back();
if(l >= r) {
cout << 0;
}
else {
cout << (r - l + 1) / 2;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |