→ eva19452002:用recursive你的記憶體很快就爆了 118.169.100.9 11/08 23:15
→ sorryChen:thanks.. my n<30 m<10, so it is ok 128.125.87.33 11/09 03:08
推 Huangs:寫個recursive才幾行而已 比打上來還快 XD 218.167.2.50 11/09 05:59
→ sorryChen:but I need to test for each enum pat 128.125.87.33 11/09 10:07
→ sorryChen:so I need to write to a file or 128.125.87.33 11/09 10:09
→ sorryChen:test in the recursive. 128.125.87.33 11/09 10:09
→ sorryChen:yield is more elegant. 128.125.87.33 11/09 10:10
推 yauhh:最簡單是把1~N做next_permutation,然後 59.112.230.115 11/09 11:19
→ yauhh:用排列的數字當索引,查查是n或m. 59.112.230.115 11/09 11:20
→ yauhh:C++不專處理pattern,在這方面當然不elegant. 59.112.230.115 11/09 11:21
→ yauhh:喔,我搞錯了,我講的會重複列出排列情況 218.160.215.75 11/09 21:24
→ bigpigbigpig:給原po:n 個元素不必完全不同也可以 61.61.252.34 04/19 13:35
→ bigpigbigpig:使用 next_permutation() 哦! 61.61.252.34 04/19 13:36