mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-07 01:23:57 -05:00
Changed Problem 67 to work with 18
This commit is contained in:
@@ -58,13 +58,10 @@ private:
|
||||
int yLocation;
|
||||
int total;
|
||||
bool fromRight;
|
||||
location(int x, int y, int t, bool r) : xLocation(x), yLocation(y), total(t), fromRight(r){ }
|
||||
location(int x, int y, int t, bool r) : xLocation(x), yLocation(y), total(t), fromRight(r){}
|
||||
};
|
||||
|
||||
//Variables
|
||||
//Static variables
|
||||
static const int NUM_ROWS = 15; //The number of rows in the array
|
||||
static std::vector<int> list[NUM_ROWS]; //Setup the list you are trying to find a path through
|
||||
//Instance variables
|
||||
std::list<location> foundPoints; //For the points that I have already found the shortest distance to
|
||||
std::list<location> possiblePoints; //For the locations you are checking this round
|
||||
@@ -72,6 +69,11 @@ private:
|
||||
|
||||
//Functions
|
||||
void invert(); //This list turns every number in the vector into 100 - num
|
||||
void setupList();
|
||||
protected:
|
||||
//Variables
|
||||
//Static variables
|
||||
static std::vector<std::vector<int>> list; //Setup the list you are trying to find a path through
|
||||
public:
|
||||
//Constructor
|
||||
Problem18();
|
||||
|
||||
Reference in New Issue
Block a user