#P6426. [COCI 2008/2009 #1] SKOCIMIS
[COCI 2008/2009 #1] SKOCIMIS
Description
Three kangaroos are playing on a number line in the desert, and each kangaroo stands on a different integer point. In one move, a kangaroo that is not in the middle jumps into the space between the other two kangaroos. No two kangaroos may ever stand on the same position.
Please let them play for as long as possible.
Input Format
Three integers representing the initial positions of the three kangaroos.
Output Format
Output the maximum number of moves the kangaroos can make.
2 3 5
1
3 5 9
3
Hint
Constraints
For of the testdata, .
Notes
This problem is translated from COCI2008-2009 CONTEST #1 SKOCIMIS, translator https://www.luogu.com.cn/user/115711
Translated by ChatGPT 5
京公网安备 11011102002149号