-rw-r--r-- 761 cryptattacktester-20231020/problemparams.cpp raw
#include <iostream>
#include "bigint.h"
#include "problem.h"
#include "selection.h"
using namespace std;
int main(int argc,char **argv)
{
auto S = selection_parse(argv+1,argc-1);
for (auto E : problem_list) {
if (!selection_allows(S,"problem",E.name)) continue;
vector<vector<bigint>> Plist = E.params(S);
for (auto P : Plist) {
bool selected = 1;
for (bigint j = 0;j < P.size();++j)
selected &= selection_allows(S,E.paramnames.at(j),P.at(j).get_str());
if (!selected) continue;
cout << "problemparams";
cout << " problem=" << E.name;
for (bigint j = 0;j < P.size();++j)
cout << (j ? ',' : ' ') << E.paramnames.at(j) << "=" << P.at(j);
cout << '\n' << flush;
}
}
return 0;
}