# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
681794 | 2023-01-14T10:40:39 Z | kthng | Temperature (POI11_tem) | C++17 | 217 ms | 26948 KB |
#include<iostream> #include<deque> using namespace std; int a[1000000][2], n; deque<int> dq; int main() { scanf("%d", &n); int ret = 1; for (int i = 0; i < n; i++) scanf("%d%d", &a[i][0], &a[i][1]); for (int i = 0; i < n; i++) { if (i && a[i - 1][0] > a[i][1]) dq.clear(); if (!dq.empty() && a[i][1] < a[dq.front()][0]) dq.pop_front(); if (!dq.empty()) ret = max(ret, i - dq.front() + 1); if (!dq.empty() && a[i][0] < a[dq.back()][0]) dq.pop_back(); dq.push_back(i); } printf("%d\n", ret); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 452 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 68 ms | 7668 KB | Output is correct |
2 | Incorrect | 82 ms | 9076 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 151 ms | 17724 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 187 ms | 23112 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 217 ms | 26948 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 179 ms | 24236 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 112 ms | 13836 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 122 ms | 12668 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 175 ms | 22444 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 160 ms | 21664 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |