Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- int n, m,l;
- vector<vector<int>>matrix(20,vector<int>(20,-1));
- vector<vector<int>>A(20,vector<int>(20,-1));
- int f(int i, int j){
- if (i == 0|| j == 0){
- return n;
- }
- return f(A[i][j-1],A[i-1][j]);
- }
- int main() {
- int d,b,a,i,j,g,g1;
- cin>>a>>b;
- for (i=0; i < a; ++i){
- for (j = 0;j <b; ++j){
- cin>>A[i][j];
- }
- }
- cout<< f(A[a-1][b-1],A[a-1][b-1]);
- cout<<"\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement