更新了许多

This commit is contained in:
OhFengGO
2023-08-23 21:52:51 +08:00
parent 971a1d91d6
commit fc324f936b
197 changed files with 6500 additions and 0 deletions

30
小码君闯迷宫.cpp Normal file
View File

@ -0,0 +1,30 @@
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdio>
#include <stack>
#include <ctime>
#include <cmath>
#include <queue>
typedef long long l;
typedef double d;
typedef char c;
using namespace std;
int n;
int a[1000][1000];
int main(){
cin >>n;
for(int i=1;i<=n;i++){
for(int j=1;j<=i*2-1;j++){
cin >>a[i][j];
}
}
for(int i=n;i>=1;i--){
for(int j=1;j<=i*2-1;j++){
a[i][j]+=min(min(a[i+1][j],a[i+1][j+1]),a[i+1][j+2]);
}
}
cout <<a[1][1];
return 0;
}