Artifact 291928c8067379300b85ee18deb0a67853a450b4:
0000: 2f 2f 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d //--------------
0010: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0020: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0030: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a ---------------.
0040: 2f 2f 20 4e 65 78 74 20 43 6f 6d 62 69 6e 61 74 // Next Combinat
0050: 69 6f 6e 0a 2f 2f 0a 2f 2f 20 56 65 72 69 66 69 ion.//.// Verifi
0060: 65 64 20 62 79 0a 2f 2f 20 20 20 2d 20 53 52 4d ed by.// - SRM
0070: 33 34 35 20 44 69 76 31 20 4c 56 33 0a 2f 2f 2d 345 Div1 LV3.//-
0080: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0090: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
00a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
00b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 4c 4c ------------..LL
00c0: 20 6e 65 78 74 5f 63 6f 6d 62 69 6e 61 74 69 6f next_combinatio
00d0: 6e 28 4c 4c 20 70 29 0a 7b 0a 09 61 73 73 65 72 n(LL p).{..asser
00e0: 74 28 20 70 20 3e 20 30 20 29 3b 0a 09 4c 4c 20 t( p > 0 );..LL
00f0: 6c 73 62 20 3d 20 70 20 26 20 2d 70 3b 0a 09 4c lsb = p & -p;..L
0100: 4c 20 72 65 6d 20 3d 20 70 20 2b 20 6c 73 62 3b L rem = p + lsb;
0110: 0a 09 4c 4c 20 72 69 74 20 3d 20 72 65 6d 20 26 ..LL rit = rem &
0120: 20 7e 70 3b 0a 09 72 65 74 75 72 6e 20 72 65 6d ~p;..return rem
0130: 20 7c 20 28 72 69 74 2f 6c 73 62 20 3e 3e 20 31 | (rit/lsb >> 1
0140: 29 2d 31 3b 0a 7d 0a )-1;.}.