#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
int main(){
int n; cin >> n;
set<pair<int, int> > s;
for(int i = 0; i < n; i++){
int x, y; cin >> x >> y;
s.insert({y, x});
}
int ans = 0;
while(!s.empty()){
pair<int, int> a = *s.rbegin();
vector<pair<int, int> > v;
for(auto i : s) if(abs(a.ss - i.ss) <= a.ff - i.ff) v.push_back(i);
for(auto i : v) s.erase(i);
}
cout << ans << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2016 ms |
190500 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2062 ms |
243472 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
2016 ms |
190500 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |