miércoles, 25 de enero de 2012

1101 Binaries Palindromes

Título: Binaries Palindromes

ID: 1101

Descripción

Given two positive integers, determine which are the integers in this range that have a palindrome binary representation. It will include ends of the interval.
Especificación de entrada

The input has the following format: In the first line an integer n, 50 <= n <= 200, indicating the intervals will be analyzed below. Then will follow n lines, each of which contains the numbers that define the range separated by a blank space. The numbers that make up the range are in the range from 1 to 200000.
Especificación de salida

The output consists of n lines, each line will be the set of numbers whose binary equivalents are palindromes. The numbers in this sequence are separated by a blank space. If there is no binary palindromes in the interval, the line is changed leaving this completely blank.
Ejemplo de entrada

6
247 333
375 609
70 154
124 301
956 961
682 769

Ejemplo de salida

255 257 273 297 313 325
381 387 403 427 443 455 471 495 511 513 561 585
73 85 93 99 107 119 127 129 153
127 129 153 165 189 195 219 231 255 257 273 297

693 717 765
http://coj.uci.cu/24h/problem.xhtml?abb=1101