<commit_before>#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

constexpr bool debug = true;

using UInt = unsigned int;

template <typename Container>
void printContainer(const Container& c, const string& name) {
    cout << "Printing container - " << name << " of size = " << c.size() << " : [";
    for (auto i = 0; i < c.size()-1; ++i) {
        cout << c[i] << ",";
    }
    cout << c[c.size()-1] << "]" << endl;
}

UInt findChange(UInt change, const vector<UInt>& coins) {
	
}

int main() {
    auto change = static_cast<UInt>(0);
    cin >> change;
	
	auto nCoins = static_cast<UInt>(0);
	cin >> nCoins;
    
	vector<UInt> coins;
    for (auto i = 0; i < nCoins; ++i) {
        auto coin = static_cast<UInt>(0);
 	   	cin >> coin;
        coins.push_back(coin);
	}
	
	if (debug) printContainer(coins, "coins");
	
	sort(coins.begin(), coins.end());
	
	auto nChange = findChange(change, coins);
	cout << nChange << endl;
	
	return 0;
}<commit_msg>first try at coin change<commit_after>#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

constexpr bool debug = true;

using UInt = unsigned int;

template <typename Container>
void printContainer(const Container& c, const string& name) {
    cout << "Printing container - " << name << " of size = " << c.size() << " : [";
    for (auto i = 0; i < c.size()-1; ++i) {
        cout << c[i] << ",";
    }
    cout << c[c.size()-1] << "]" << endl;
}

void findChange(UInt change, const vector<UInt>& coins, UInt& solutions) {
	if (change != 0) {
		for (auto coin : coins) {
			if (debug) {
				cout << "found " << solutions << " solutions and remaining change is = " << change << endl;
			}
			if (change > coin) {
				findChange(change - coin, coins, solutions);
			} else if (change - coin == 0) {
				++solutions;
			}
		}
	}
}

int main() {
    auto change = static_cast<UInt>(0);
    cin >> change;
	
	auto nCoins = static_cast<UInt>(0);
	cin >> nCoins;
    
	vector<UInt> coins;
    for (auto i = 0; i < nCoins; ++i) {
        auto coin = static_cast<UInt>(0);
 	   	cin >> coin;
        coins.push_back(coin);
	}
	
	sort(coins.begin(), coins.end());
	
	if (debug) printContainer(coins, "coins (sorted)");
	
	UInt solutions;
	findChange(change, coins, solutions);
	cout << solutions << endl;
	
	return 0;
}
{'fraction_non_alphanumeric': 0.17494780793319414, 'fraction_numerical': 0.007515657620041753, 'mean_word_length': 3.1239242685025816, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2405722', 'n_tokens_mistral': 894, 'n_tokens_neox': 831, 'n_words': 236}