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

std::vector<int> eratosthenes(int max)
{
	std::vector<bool> val;
	val.resize(max, true);
	val[0]=val[1]=false;
	int n=sqrt(val.size());
	for(int i{2};i<=n;++i)
		if(val[i])
			for(int j=1;(i*i+j*i)<val.size();j++)
				val[i*i+j*i]=false;
	std::vector<int> primes;
	for(int i{0};i<val.size();++i)
		primes.push_back(val[i]?i:false);
	return primes;
}

int main()
{
	auto primes=eratosthenes(1000);
	int num_primes{0}, sa, sb;

	for(int a=-999;a<1000;++a)
	{
		for(int b=a;b<1000;++b)
		{
			if(!primes[b])
				continue;
			bool prime=true;
			int n{0};
			for(;prime;++n)
			{
				int tmp=std::abs((n*n)+(a*n)+b);
				if(!primes[tmp])
					prime=false;
			}
			if(n>num_primes)
			{
				sa=a;
				sb=b;
				num_primes=n;
			}
		}
	}
	std::cout<<sa*sb<<std::endl;
}<commit_msg>Optimizations<commit_after>#include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>

void eratosthenes(int max, std::vector<bool> &val)
{
	val.resize(max, true);
	val[0]=val[1]=false;
	int n=sqrt(val.size());
	for(int i{2};i<=n;++i)
		if(val[i])
			for(int j=i*i+i;j<val.size();j+=i)
				val[j]=false;
}

int main()
{
	std::vector<bool> primes;
	eratosthenes(972, primes);
	int16_t num_primes{0}, sa, sb, n;

	for(int16_t a{-999};a<1000;a+=2)
	{
		for(int16_t b{3};b<998;b+=2)
		{
			if(!primes[b])
				continue;
			for(n=0;primes[std::abs((n*n)+(a*n)+b)];++n);
			if(n>num_primes)
			{
				sa=a;
				sb=b;
				num_primes=n;
			}
		}
	}
	std::cout<<sa*sb<<std::endl;
}
{'fraction_non_alphanumeric': 0.23873873873873874, 'fraction_numerical': 0.03153153153153153, 'mean_word_length': 4.418118466898955, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 18, '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': '720029', 'n_tokens_mistral': 878, 'n_tokens_neox': 762, 'n_words': 106}