# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
492442 | 2021-12-07T10:46:57 Z | aris12345678 | Temperature (POI11_tem) | C++14 | 223 ms | 30624 KB |
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; #define X first #define Y second const int mxN = 1000005; int x[mxN], y[mxN]; int main() { int n; scanf("%d", &n); stack<pii> st; int ans = 0; for(int i = 0; i < n; i++) { scanf("%d %d", &x[i], &y[i]); if(st.empty()) st.push({x[i], y[i]}); else if(st.top().X <= y[i]) st.push({x[i], y[i]}); else { ans = max(ans, int(st.size())); while(!st.empty()) st.pop(); st.push({x[i], y[i]}); } } ans = max(ans, int(st.size())); printf("%d\n", ans); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 296 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 332 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 77 ms | 9596 KB | Output is correct |
2 | Correct | 77 ms | 12340 KB | Output is correct |
3 | Incorrect | 98 ms | 13544 KB | Output isn't correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 151 ms | 20564 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 203 ms | 26220 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 221 ms | 30624 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 223 ms | 29888 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 118 ms | 18568 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 119 ms | 15760 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 167 ms | 25368 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 166 ms | 24420 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |