Skip to content

Instantly share code, notes, and snippets.

View c650's full-sized avatar
🛰️

c650

🛰️
View GitHub Profile
@c650
c650 / combo.cpp
Created June 26, 2016 17:52
makes combinations of vector elements
#include <iostream>
#include <vector>
#include <cstdio>
template <typename T>
void combination(std::vector<T>& vec, std::vector<T>& tmp, int start, int end, int idx, int r);
int main() {
std::vector<unsigned int> vec = {1,2,3,4,5};
std::vector<unsigned int> tmp(vec.size());