核电站问题
This commit is contained in:
parent
2d2b47caec
commit
6cf3c5016d
20
1799_01choesornot/01choseornot.cpp
Normal file
20
1799_01choesornot/01choseornot.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#include<iostream>
|
||||||
|
using namespace std;
|
||||||
|
int main(){
|
||||||
|
long long n,m,f[52][6]={0};
|
||||||
|
cin>>n>>m;
|
||||||
|
f[0][0]=1;
|
||||||
|
f[1][0]=1;
|
||||||
|
for(int i=1;i<=n;i++){
|
||||||
|
//cout<<f[i][0]<<" ";
|
||||||
|
f[i+1][0]=f[i][0];
|
||||||
|
for(int j=1;j<=m-1;j++){
|
||||||
|
f[i][j]=f[i-1][j-1];
|
||||||
|
f[i+1][0]+=f[i][j];
|
||||||
|
if(j==i) break;
|
||||||
|
//cout<<f[i][j]<<" ";
|
||||||
|
}
|
||||||
|
//cout<<endl;
|
||||||
|
}
|
||||||
|
cout<<f[n+1][0];
|
||||||
|
}
|
BIN
1799_01choesornot/01choseornot.exe
Normal file
BIN
1799_01choesornot/01choseornot.exe
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
4 3
|
1
1799_01choesornot/test/in2.txt
Normal file
1
1799_01choesornot/test/in2.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
5 3
|
1
1799_01choesornot/test/in3.txt
Normal file
1
1799_01choesornot/test/in3.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
3 2
|
1
1799_01choesornot/test/ince.txt
Normal file
1
1799_01choesornot/test/ince.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
49 5
|
1
1799_01choesornot/test/ince2.txt
Normal file
1
1799_01choesornot/test/ince2.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
49 2
|
@ -1,7 +1,30 @@
|
|||||||
## z:\Chao\src\Template\test\in.txt
|
## z:\Chao\src\1799_01choesornot\test\in.txt
|
||||||
2020/03/14 ÖÜÁù 11:41:28.68
|
2020/03/22 ÖÜÈÕ 13:02:25.04
|
||||||
Hello Easy C++ project!
|
13
|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
Process exited after 200 ms with return value 0
|
Process exited after 200 ms with return value 0
|
||||||
|
|
||||||
|
## z:\Chao\src\1799_01choesornot\test\in2.txt
|
||||||
|
2020/03/22 ÖÜÈÕ 13:02:25.04
|
||||||
|
24
|
||||||
|
-----------------------------------------------
|
||||||
|
Process exited after 90 ms with return value 0
|
||||||
|
|
||||||
|
## z:\Chao\src\1799_01choesornot\test\in3.txt
|
||||||
|
2020/03/22 ÖÜÈÕ 13:02:25.04
|
||||||
|
5
|
||||||
|
-----------------------------------------------
|
||||||
|
Process exited after 80 ms with return value 0
|
||||||
|
|
||||||
|
## z:\Chao\src\1799_01choesornot\test\ince.txt
|
||||||
|
2020/03/22 ÖÜÈÕ 13:02:25.04
|
||||||
|
256641310658978
|
||||||
|
-----------------------------------------------
|
||||||
|
Process exited after 90 ms with return value 0
|
||||||
|
|
||||||
|
## z:\Chao\src\1799_01choesornot\test\ince2.txt
|
||||||
|
2020/03/22 ÖÜÈÕ 13:02:25.04
|
||||||
|
20365011074
|
||||||
|
-----------------------------------------------
|
||||||
|
Process exited after 80 ms with return value 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user