| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 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();
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
