| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1357567 | jump | Lightning Rod (NOI18_lightningrod) | C++20 | 673 ms | 456 KiB |
#include <bits/stdc++.h>
#define int long long
int n,cnt=1,x,y;
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cin >> n;
std::cin >> x >> y;
for(int i=1;i<n;i++){
int nx,ny;
std::cin >> nx >> ny;
if(ny-y>=nx-x){
//upper (new)umbrella case
x=nx,y=ny;
}
else if(y-ny>=nx-x){
//lower (old)umbrealla case
}
else{
x=nx,y=ny;
cnt+=1;
}
}
std::cout << cnt;
}| # | 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... | ||||
