Notice
Recent Posts
Recent Comments
Link
목록15652 (1)
Be a developer
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/4U9iU/btqt6DXgV8M/15KUwQ0f4KMIRvxo9pgUgk/img.png)
N과 M (2)와 같은 문제이다. 코드를 조금만 수정해주면 된다. 123456789101112131415161718192021222324252627282930313233#include #include #include #include using namespace std; int n, m;vector v; void solve(int num) { //뽑아야 할 개수만큼 뽑고 나면 출력한다. if (v.size() == m) { for (auto x : v) { printf("%d ", x); } printf("\n"); return; } for (int i = num; i > n >> m; solve(1); return 0;}Colored by Color Scriptercs
알고리즘
2019. 4. 4. 16:23