| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1357571 | jump | Lightning Rod (NOI18_lightningrod) | C++20 | 920 ms | 159172 KiB |
#include <bits/stdc++.h>
#define int long long
int n,cnt=1;
signed main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::stack<std::pair<int,int>> st;
std::cin >> n;
for(int i=0;i<n;i++){
int nx,ny;
std::cin >> nx >> ny;
if(st.empty()){
st.push({nx,ny});
}
else if(st.top().second-ny<nx-st.top().first){
while(!st.empty()&&ny-st.top().second>=nx-st.top().first)st.pop();
st.push({nx,ny});
}
}
std::cout << st.size();
}| # | 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... | ||||
