| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 111820 | 梁乃元 | 不同路径 | C++ | Runtime Error | 0 | 1 MS | 4900 KB | 514 | 2023-11-25 08:19:23 |
# include <iostream> using namespace std ; int a [1145] [1145] ; long long cnt = 0 , n ; void dfs ( int x , int y ) { if ( x == n && y == n ) { cnt ++ ; return ; } if ( a [x + 1] [y] == 0 ) { dfs ( x + 1 , y ) ; } if ( a [x] [y + 1] == 0 ) { dfs ( x , y + 1 ) ; } return ; } int main ( ) { cin >> n ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= n ; j ++ ) { cin >> a [i] [j] ; } } dfs ( 1 , 1 ) ; cout << cnt << endl ; return 0 ; }