- #include <iostream> 
-   
- int index( int n ) 
- { 
-     return 3 - ( n >> 8 ) + ( n >> 10 ); 
- } 
-   
- void test( int n ) 
- { 
-     std::cout << n << " - "  << index( n ) << std::endl; 
- } 
-   
- int main() { 
-     for( int i : {1024, 512, 256, 128 } ) 
-         test( i ); 
-     return 0; 
- } 
				I2luY2x1ZGUgPGlvc3RyZWFtPgoKaW50IGluZGV4KCBpbnQgbiApCnsKICAgIHJldHVybiAzIC0gKCBuID4+IDggKSArICggbiA+PiAxMCApOwp9Cgp2b2lkIHRlc3QoIGludCBuICkKewogICAgc3RkOjpjb3V0IDw8IG4gPDwgIiAtICIgIDw8IGluZGV4KCBuICkgPDwgc3RkOjplbmRsOwp9CgppbnQgbWFpbigpIHsKICAgIGZvciggaW50IGkgOiB7MTAyNCwgNTEyLCAyNTYsIDEyOCB9ICkKICAgICAgICB0ZXN0KCBpICk7CiAgICByZXR1cm4gMDsKfQ==