æè¿AtCoderãªã©ã«åå ãã¦ãã¦ããã¹ã¦ã®çµã¿åãããçæãã¤ã¤è¨ç®ããã¨ãã£ãæ©ä¼ã«ãªãã©ãééããæ¯åé å¼µã£ã¦å®è£ ãã¦ããã®ã ãã©ãbitå ¨æ¢ç´¢ã¨ããæ¹æ³ããããããã¨ç¥ãã調ã¹ã¦ãKotlinã§ã©ãæ¸ããèããçµæ次ã®ããã«ãªã£ãã import java.util.BitSet fun bitFullSearch(n: Int): List<BitSet> = (0 until (1 shl n)).map { bit -> BitSet(n).apply { repeat(n) { i -> set(i, bit and (1 shl i) > 0) } } } ãã¨ãã° bitFullSearch(4) ãªã©ã¨å¼ã³åºãã¨ããããã次ã®bitãç«ã£ãBitSetã®ãªã¹ããæã«å ¥ãã {} {0} {1} {0, 1} {2} {0, 2} {1, 2} {0, 1, 2} {
{{#tags}}- {{label}}
{{/tags}}