The squares of an infinite chessboard are numbered successively as follows: in the lower left corner (first row, first column) we put 0 (zero), and then in every other square we put the smallest nonnegative integer that does not appear to its left in the same row or below it in the same column. See it partially filled:
| | | | | | | | |
+---+---+---+---+---+---+---+---+--
| 5 | | | | | | | |
+---+---+---+---+---+---+---+---+--
| 4 | 5 | | | | | | |
+---+---+---+---+---+---+---+---+--
| 3 | 2 | 1 | | | | | |
+---+---+---+---+---+---+---+---+--
| 2 | 3 | 0 | 1 | | | | |
+---+---+---+---+---+---+---+---+--
| 1 | 0 | 3 | 2 | 5 | | | |
+---+---+---+---+---+---+---+---+--
| 0 | 1 | 2 | 3 | 4 | 5 | | |
+---+---+---+---+---+---+---+---+--
Find the law that rules the numbers that fills the chessboard, so that in seconds, you can evaluate the number that is, for example, in the intersection of the 1000th row and the 100th column.
(In reply to
re(2): About XOR - only to by pcbouhid)
According to my "green card" for system 360 Assembly language, XR, X, XI and XC are all exclusive ors. They are respectively for Register-to-register, register-to-memory, character immediate, and memory-to-memory. So both your XR and XC were (are) in fact exclusive ors.
The common OR was (is) OR, O, OI and OC.
|
Posted by Charlie
on 2005-10-29 09:35:02 |