A large field has a dog and a gopher. The dog wants to eat the gopher, while the gopher wants to run to safety through one of several gopher holes dug in the surface of the field. Neither the dog nor the gopher is a math major; however, neither is entirely stu…

2020年1月17日 0条评论 1252点热度 0人点赞 code 阅读全文

King Arthur is planning to build the round table in a room which has a triangular window in the ceiling. He wants the sun to shine on his round table. In particular, he wants the table to be totally in the sunlight when the sun is directly overhead at noon. Th…

2020年1月17日 0条评论 1140点热度 0人点赞 code 阅读全文

You have to cut a wood stick into several pieces. The most affordable company, Analog Cutting Machinery (ACM), charges money according to the length of the stick being cut. Their cutting saw allows them to make only one cut at a time. It is easy to see that di…

2020年1月17日 0条评论 1416点热度 0人点赞 code 阅读全文

One day, an ant named Alice came upon an M x M chessboard. She wanted to explore all the cells of the board. So she began to walk along the board by peeling off a corner of the board. Alice started at square (1, 1). First, she went up for a step, then a step t…

2020年1月17日 0条评论 1549点热度 0人点赞 code 阅读全文

<p>A turtle named Mack, to avoid being cracked, has enlisted your advice as to the order in which turtles should be stacked to form Yertle the Turtle's throne. Each of the 5,607 turtles ordered by Yertle has a different weight and strength. Your task is …

2020年1月17日 0条评论 1059点热度 0人点赞 code 阅读全文

<p>Given an m x n matrix of integers, you are to write a program that computes a path of minimal weight from left to right across the matrix. A path starts anywhere in column 1 and consists of a sequence of steps terminating in column n. Each step consis…

2020年1月17日 0条评论 1500点热度 0人点赞 code 阅读全文