#define OLC_PGE_APPLICATION #include "pixelGameEngine.h" #include "olcutils.h" using namespace olc; void incrementClock(int&clockCycle,int®,int&sum){ clockCycle++; if (clockCycle==20|| clockCycle==60|| clockCycle==100|| clockCycle==140|| clockCycle==180|| clockCycle==220){ sum+=clockCycle*reg; } } int main() { std::ifstream file("input"); int clockCycle=0; bool noop=true; int reg=1; int amtToAdd=0; int sum=0; while (file.good()){ std::string line; std::getline(file,line); if (line.length()>0){ std::string command=line.substr(0,line.find(' ')); if (command=="noop"){ noop=true; //std::cout<<"noop"<