답안 #789874

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
789874 2023-07-22T06:41:05 Z Supersonic Roller Coaster Railroad (IOI16_railroad) C++14
0 / 100
46 ms 5572 KB
#include "railroad.h"
#include <bits/stdc++.h>
using namespace std;
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
    int n = (int) s.size();
    vector<pair<int,int>> st;
    for(int i=0;i<n;i++){
        st.push_back({s[i],t[i]});
    }
    sort(st.begin(),st.end());
    long long sp=0;
    for(int i=0;i<n;i++){
        if(st[i].first>sp)return 1;
        else sp+=st[i].second;
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 46 ms 5572 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB answer is not correct: 1 instead of 0
2 Halted 0 ms 0 KB -