2170번 - 선 긋기
채점번호 29163380 code 에서
if (container[i - 1].second > container[i].second) {
l -= (container[i].second - container[i].first);
}
이 부분 때문에 data input값으로 다음 값이 들어가면 오류를 잡지 못합니다.
input:
4
5 10
15 20
25 30
7 35
output:35
원래는 30이 나와야 합니다.
재채점했습니다.
댓글을 작성하려면 로그인해야 합니다.
12345up 5년 전 1
채점번호 29163380 code 에서
if (container[i - 1].second > container[i].second) {
l -= (container[i].second - container[i].first);
}
이 부분 때문에 data input값으로 다음 값이 들어가면 오류를 잡지 못합니다.
input:
4
5 10
15 20
25 30
7 35
output:35
원래는 30이 나와야 합니다.