Advertisement
MatveyL

хрень какая-то

Dec 6th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. using namespace std;
  5. int n, m,l;
  6. vector<vector<int>>matrix(20,vector<int>(20,-1));
  7. vector<vector<int>>A(20,vector<int>(20,-1));
  8. int f(int i, int j){
  9. if (i == 0|| j == 0){
  10. return n;
  11. }
  12.  
  13. return f(A[i][j-1],A[i-1][j]);
  14. }
  15. int main() {
  16. int d,b,a,i,j,g,g1;
  17. cin>>a>>b;
  18. for (i=0; i < a; ++i){
  19. for (j = 0;j <b; ++j){
  20. cin>>A[i][j];
  21. }
  22. }
  23. cout<< f(A[a-1][b-1],A[a-1][b-1]);
  24. cout<<"\n";
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement