A monochrome screen is stored as a single array of bytes, allowing eight consecutive pixels to be stored in one byte. The screen has width w, where w is divisib ...
7.2 There are three ants on different vertices of a triangle. What is the probability of collision (between any two or all of them) if they start walking on the ...
7.1 You have a basketball hoop and someone says that you can play one of two games.Game 1: You get one shot to make the hoop.Game 2: You get three shots and you ...
Write a function to determine the number of bits required to convert integer A to integer B.EXAMPLE:Input:31,14Output:2发帖规范:http://www.1point3 ...
Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and bit 3 are swapped, an ...
An array A contains all the integers from 0 to n, except for one number which is missing. In this problem, we cannot access an entire integer in A with a single ...
7.4 Write methods to implement the multiply, subtract, and divide operations for integers. Use only the add operator.发帖规范:http://www.1point3acres.com/bbs/ ...
7.3 Given two lines on a Cartesian plane, determine whether the two lines would intersect.发帖规范:http://www.1point3acres.com/bbs/thread-48094-1-1.htmlhttp:/ ...
7.6 Given a two-dimensional graph with points on it, find a line which passes the most number of points.发帖规范:http://www.1point3acres.com/bbs/thread-48094- ...
7.5 Given two squares on a two-dimensional plane, find a line that would cut these two squares in half. Assume that the top and the bottom sides of the square ...
或者说已经做完了???
6.6 There are 100 closed lockers in a hallway. A man begins by opening all 100 lockers. Next, he closes every second locker. Then on his third pass, he toggles ...
6.5 There is a building of 100 floors. If an egg drops from the Nth floor or above, it will break. If it's dropped from any floor below, it will not break. You' ...
6.4 A bunch of people are living on an island, when a visitor comes with a strange order: all blue-eyed people must leave the island as soon as possible. There ...
6.3 You have a five-quart jug, a three-quart jug, and an unlimited supply of water(but no measuring cups). How would you come up with exactly four quarts of wat ...
There is an 8x8 chess board in which two diagonally opposite corners have been cut off. You are given 31 dominos to cover the entire board? Prove your answer (b ...
6.1 You have 20 bottles of pills. 19 bottles have 1.0 gram pills, but one has pills of weight 1.1 grams. Given a scale that provides an exact measurement, how ...
There is an 8*8 chess board in which two diagonally opposite corners have been cut off. You are given 31 dominoes, and a single domino can cover exactly two squ ...
You have a five-quart jug, a three-quart jug, and an unlimited supply of water (but no measuring cups). How would you come up with exactly four quarts of water? ...
You have 20 bottles of pills, 19 bottles have 1.0 gram pills, but one has pills of weight 1.1 gram. Given a scale that provides an exact measurement, how would ...