# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
24387 | 2017-06-06T13:00:52 Z | gs14004 | Roller Coaster Railroad (IOI16_railroad) | C++11 | 563 ms | 27060 KB |
#include "railroad.h" #include <bits/stdc++.h> using namespace std; typedef pair<int, int> pi; map<int, int> mp; long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) { vector<int> v; int n = (int) s.size(); for(int i=0; i<n; i++){ mp[s[i]]++; mp[t[i]]--; } for(auto &i : mp) v.push_back(i.second); int curBef = 1; for(int i=0; i<v.size(); i++){ if(v[i] > 0){ curBef -= v[i]; if(curBef < 0) return 1; } curBef -= v[i]; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | n = 2 |
2 | Correct | 0 ms | 2024 KB | n = 2 |
3 | Correct | 0 ms | 2024 KB | n = 2 |
4 | Correct | 0 ms | 2024 KB | n = 2 |
5 | Correct | 0 ms | 2024 KB | n = 2 |
6 | Incorrect | 0 ms | 2024 KB | answer is not correct: 1 instead of 523688153 |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | n = 2 |
2 | Correct | 0 ms | 2024 KB | n = 2 |
3 | Correct | 0 ms | 2024 KB | n = 2 |
4 | Correct | 0 ms | 2024 KB | n = 2 |
5 | Correct | 0 ms | 2024 KB | n = 2 |
6 | Incorrect | 0 ms | 2024 KB | answer is not correct: 1 instead of 523688153 |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 563 ms | 27060 KB | answer is not correct: 1 instead of 0 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2024 KB | n = 2 |
2 | Correct | 0 ms | 2024 KB | n = 2 |
3 | Correct | 0 ms | 2024 KB | n = 2 |
4 | Correct | 0 ms | 2024 KB | n = 2 |
5 | Correct | 0 ms | 2024 KB | n = 2 |
6 | Incorrect | 0 ms | 2024 KB | answer is not correct: 1 instead of 523688153 |
7 | Halted | 0 ms | 0 KB | - |