| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1359712 | chiiu | Lightning Rod (NOI18_lightningrod) | C++20 | 1028 ms | 263208 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
const int MAXN = 100005;
ll n, ans = 1;
vector<pair<ll, ll>> v;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> n;
for(int i = 1; i <= n; i++)
{
ll x, y;
cin >> x >> y;
v.push_back({x, y});
}
sort(v.begin(), v.end());
if(n == 2){
if(v[1].fi - v[0].fi <= abs(v[1].se - v[0].se))
cout << 1;
else
cout << 2;
return 0;
}
for(int i = 1; i < n; i++){
if(v[i].fi != v[i-1].fi)
ans++;
}
cout << ans;
return 0;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
