#define OLC_PGE_APPLICATION #include "pixelGameEngine.h" #include "olcutils.h" #include "InfInt.h" using namespace olc; //Break down each number into its raw factors. //The number itself is also stored. //If the factorization is larger than 19, we can discard it. It shouldn't matter. std::vectorfactor(int numb){ std::vectorfactors; while (numb>1){ for (int i=2;i>factors; std::vector>offsets; factorNumber(int numb){ SetupOffsets(numb); std::vectortmp=factor(numb); for (int j=0;jtmp=factor(numb); for (int j=0;j&offset=offsets[i]; for (int j=0;jfactors=factor(numb); for (int i=0;ifactors.size();j++){ if (this->factors[j].first==factors[i]){ this->factors[j].second++; goto gonext; } } this->factors.push_back({factors[i],1}); gonext:; } return*this; } int operator%(int numb){ for (int i=0;i items; char operation; int operation_amt; int divisible; int trueThrow; int falseThrow; int inspAmt; }; int main() { std::vector monkeys; std::ifstream file("input"); monkeys.push_back({{89,95,92,64,87,68},'*',11,2,7,4}); monkeys.push_back({{87,67},'+',1,13,3,6}); monkeys.push_back({{95, 79, 92, 82, 60},'+',6,3,1,6}); monkeys.push_back({{67, 97, 56},'*',-1,17,7,0}); monkeys.push_back({{80, 68, 87, 94, 61, 59, 50, 68},'*',7,19,5,2}); monkeys.push_back({{73, 51, 76, 59},'+',8,7,2,1}); monkeys.push_back({{92},'+',5,11,3,0}); monkeys.push_back({{99, 76, 78, 76, 79, 90, 89},'+',7,5,4,5}); /*monkeys.push_back({{79,98},'*',19,23,2,3}); monkeys.push_back({{54, 65, 75, 74},'+',6,19,2,0}); monkeys.push_back({{79, 60, 97},'*',-1,13,1,3}); monkeys.push_back({{74},'+',3,17,0,1});*/ /* factorNumber test(17); test=84075; for (int i=0;i<77;i++){ test*=23; } std::cout<