제출 #619059

#제출 시각아이디문제언어결과실행 시간메모리
6190591bin무제 (POI11_tem)C++14
0 / 100
194 ms18508 KiB
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define all(v) v.begin(), v.end() typedef long long ll; const int NMAX = 1e6 + 5; int n, mn, mx, ans, x; deque<pair<int, int>> dq; int main(void){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n; for(int i = 0; i < n; i++){ cin >> mn >> mx; x = i; while(dq.size() && dq.front().fi <= mx) { x = dq.front().fi; dq.pop_front(); } dq.emplace_back(mn, x); ans = max(ans, i - dq.front().se + 1); } cout << ans; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...