#include #include #include "quizcheck.h" using namespace std; bool next_combo(string& s) { unsigned i{0}; while ( i < s.size() ) { if ( s.at(i) == '-' ) { s.at(i) = '|'; return true; } else if ( s.at(i) == '|') { s.at(i) = '-'; } ++i; } return false; } int main() { vector answer(20); for ( string& s : answer ) { int score = check(answer); s = "-----"; do { if ( check(answer) > score ) break; } while ( next_combo(s) ); cout << s << endl; } return 0; }