Topcoder SRM148Div2Hardの問題を解こうと思った時に、
Pythonで組み合わせってどうやって作るんだろうなと困ったので、調べてみた。
(まるで他言語だと書けるような言い回しですが、書けません。next_permutationという関数があるらしいということしか知りません。)
How to generate all permutations of a list in Python
このページに書いてあった。
この回答がとってもわかりやすい。
itertools便利だなー
http://docs.python.jp/2.7/library/itertools.html
登録:
コメントの投稿 (Atom)
1 コメント:
El Cortez Casino Hotel | Mapyro
The El Cortez Hotel is the place that gives you the 충청북도 출장마사지 perfect escape and tranquility to explore 과천 출장안마 the Caribbean. Try a 전라북도 출장안마 little 충주 출장마사지 while on the banks of the 양산 출장샵 El Cortez Rating: 7.9/10 · 2,505 reviews
コメントを投稿