#define OLC_PGE_APPLICATION #include "pixelGameEngine.h" #include "olcutils.h" using namespace olc; int main() { std::ifstream file("input"); std::vector> data; while (file.good()){ std::string line; std::getline(file,line); if (line.length()>0){ std::cout<rowData; for (int i=0;i=0;x--){//Towards the left. if (data[row][x]>=target){ int diff=col-x; score*=diff; std::cout<<" (Left Scan) Score increased by "<=target){ int diff=x-col; score*=diff; std::cout<<" (Right Scan) Score increased by "<=0;y--){//Towards up. if (data[y][col]>=target){ int diff=row-y; score*=diff; std::cout<<" (Up Scan) Score increased by "<=target){ int diff=y-row; score*=diff; std::cout<<" (Down Scan) Score increased by "<=maxScore){ maxScore=score; } } } //Include edges. std::cout<<"Max score:"<