일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 초보
- 빅데이터
- c프로그래밍
- 코딩연습
- c언어문제풀이
- 알고리즘
- Python
- 대학교재
- 코딩테스트
- 연습문제
- 소수경로
- 모두를위한R데이터분석입문
- 모두를위한 R데이터분석
- 대학교재풀이
- 코틀린
- 코딩
- IT
- Algorithm
- 도전실전예제
- 문제해결
- 빅데이터입문
- C언어
- PrimePath
- 기술
- 데이터처리
- 혼자공부하는C언어
- 혼공C
- r
- c++
- 혼공씨
- Today
- Total
목록코딩연습 (2)
Jupitor's Blog

Write a program that solves the following problem: Three missionaries and three cannibals come to a river and find a boat that holds two people. Everyone must get across the river to continue on the journey. However, if the cannibals ever outnumber the missionaries on either bank, the missionaries will be eaten. Find a series of crossings that will get everyone safely to the other side of the ri..

You have two jugs: a 4-gallon jug and a 3-gallon jug. Neither of the jugs have markings on them. There is a pump that can be used to fill the jugs with water. How can you get exactly two gallons of water in the 4-gallon jug? 당신한테 물통 2개가 있는데, 4갤런짜리랑 3갤런짜리다. 2개 다 어떤 마킹같은건 안되있다. 옆에는 물통에 물을 가득 채울 수 있는 펌프가 있다. 4갤런짜리 물통에 2리터를 담을 수 있는가? 바로 다음 문제는 Generalize the problem above so that the parameters to y..