Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads SourceCode Windows Develop Other

Catch_That_Cow

  • Category : Other
  • Tags :
  • Update : 2012-11-26
  • Size : 176kb
  • Downloaded :0次
  • Author :上*****
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Download1 Download2
Don't use download software fo downloading.
If download fail,Try it again for free.
Introduction - If you have any usage issues, please Google them yourself
shangdiwangpai Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer John has two modes of transportation: walking and teleporting. * Walking: FJ can move from any point X to the points X- 1 or X+ 1 in a single minute * Teleporting: FJ can move from any point X to the point 2 × X in a single minute. If the cow, unaware of its pursuit, does not move at all, how long does it take for Farmer John to retrieve it? Input Line 1: Two space-separated integers: N and K Output Line 1: The least amount of time, in minutes, it takes for Farmer John to catch the fugitive cow. Sample Input 5 17 Sample Output 4 Hint The fastest way for Farmer John to reach the fugitive cow is to move along the following path: 5-10-9-18-17, which takes 4 minutes.
Packet file list
(Preview for download)
Catch_That_Cow\Catch_That_Cow.cpp
..............\Catch_That_Cow.dsp
..............\Catch_That_Cow.dsw
..............\Catch_That_Cow.ncb
..............\Catch_That_Cow.opt
..............\Catch_That_Cow.plg
..............\Debug\Catch_That_Cow.exe
..............\.....\Catch_That_Cow.ilk
..............\.....\Catch_That_Cow.obj
..............\.....\Catch_That_Cow.pch
..............\.....\Catch_That_Cow.pdb
..............\.....\StdAfx.obj
..............\.....\vc60.idb
..............\.....\vc60.pdb
..............\ReadMe.txt
..............\StdAfx.cpp
..............\StdAfx.h
..............\Debug
Catch_That_Cow
Related instructions
  • We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
  • The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
  • Please use Winrar for decompression tools
  • If download fail, Try it againg or Feedback to us.
  • If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
  • Before downloading, you can inquire through the uploaded person information

Nothing.

Post Comment
*Quick comment Recommend Not bad Password Unclear description Not source
Lost files Unable to decompress Bad
*Content :
*Captcha :
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.