P3534 [POI 2012] STU-Well
题目描述
Byteasar has set off on a journey along the Dry River, which crosses the Byteotian Desert.
Unfortunately, the Dry River has dried out, and Byteasar has run out of water.
His only hope is to dig a deep enough well in the dried river bed.
Realising the graveness of his situation, Byteasar decides to plan everything carefully before he actually starts digging.
The danger is that he drains his strength before he reaches the water level - in such case he is unlikely to survive.
He managed to determine the depth of the water level. He also knows how much he can dig before losing strength.
His only worry is a possible landslide, which might bury him alive.
He sends you (via a satellite telephone) a topographic map of the river bed.
And, of course, he asks you to help him determine where he should dig so that he reaches water before draining his strength while keeping the slope of his excavation as gentle as possible.
He is waiting for your advice!
输入格式
无
输出格式
无