fork(2) download
  1. #include <cstdio>
  2. #include <vector>
  3. #include <iostream>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. int max_path(vector<vector<int> > pyramid, int n) {
  9. return 1;
  10. }
  11.  
  12. int main() {
  13. long long int n;
  14. cin >> n;
  15. vector<vector<int> > pyramid(n,vector<int>(n,0));
  16. for (int i=0; i<n; i++) {
  17. for(int j=0; j<=i; j++) {
  18. cin >> pyramid[i][j];
  19. }
  20. }
  21. cout << max_path(pyramid,n) << endl;
  22. }
Success #stdin #stdout 0s 3480KB
stdin
5
7
3 8
8 1 0
2 7 4 4
4 5 2 6 5
stdout
1