Commit 84aa7cab by Andrew Dahl

Optimized Problem 15

parent dbf75e42
Showing with 2 additions and 2 deletions
......@@ -7,7 +7,7 @@ const int size = 21;
map<int,map<int,long int> > route_grid;
long int find_route(int x, int y, bool test=false)
long int find_route(int x, int y)
{
if(x < 0 || x >= size || y < 0 || y >= size)
return 0;
......@@ -28,7 +28,7 @@ int main() {
for(int i = size - 2; i >= 0; i--)
for(int j = size - 2; j >=0; j--)
route_grid[i][j] = find_route(i,j,true);
route_grid[i][j] = find_route(i,j);
cout << route_grid[0][0] << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment