Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. while(memory[i*row+j]!=0)
  2. {
  3. l = memory[i*row+j - 1];
  4. u = memory[i*row+j - row];
  5. ul = memory[i*row+j - row - 1];
  6. maxValue = maxFun(l,u,ul);
  7. if(maxValue == ul)
  8. {
  9. p.insert(p.begin(),std::tuple<'m',s1[i-1],s2[j-1]>);
  10. i--;
  11. j--;
  12. }
  13. if(maxValue==u)
  14. {
  15. //p.insert(p.begin(),'d');//Gi[i][j]+1);
  16. p.insert(p.begin(),std::tuple<'d',s2[j-1],'-'>);
  17. i = i - 1; //- Gi[i][j] - 1;
  18. }
  19. if(maxValue==l)
  20. {
  21. //p.insert(p.begin(),'i');
  22. p.insert(p.begin(),std::tuple<'i','-',s1[i-1]>);
  23. j = j - 1; //- Gd[i][j] - 1;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement