Be serious.

###### uva 10934 装满水的气球

f[i][j] = f[i][j-1] + f[i-1][j-1] + 1;

code:

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;

long long f[110][65];

void init(){
memset(f, 0, sizeof(f));
for(int i = 1;  i < 64; i++){
for(int j = 1; j < 64; j++){
f[i][j] = f[i][j-1] + 1 + f[i-1][j-1];
}
}
}
int main(){
init();
int k;
long long n;
while(scanf("%d%lld",&k,&n) != EOF){
if(k == 0) break;
k = min(k, 63);
bool ok = false;
for(int i = 0; i <= 63; i++ ){
if(f[k][i] >= n){
printf("%d\n",i);
ok = true;
break;
}
}
if(!ok) printf("More than 63 trials needed.\n");
}
return 0;
}

#### uva 10934 Dropping water balloons（dp | 难想）

2013-09-12 00:29:35

#### uva 10934 - Dropping water balloons(dp)

2014-03-26 11:10:06

#### Uva-10934 Dropping water balloons(dp)

2017-03-13 22:07:23

#### uva 11076 给n个数字 n个数字的所有排列出来的数 相加 求和

2017-07-26 12:49:23

#### UVa10934 - Dropping water balloons（经典dp）

2017-11-02 21:50:09

#### UVA 10934 Dropping water balloons(经典DP)

2015-05-28 20:44:21

#### UVa 10934 (主要是思路)

2017-05-22 11:40:55

#### 区间DP(修缮长城，uva 1336)

2016-09-26 14:27:48

#### UVa #1336 Fixing the Great Wall (例题9-21)

2015-03-05 14:09:00

#### UVA - 1336 Fixing the Great Wall 记忆化搜索

2015-08-18 13:56:02

uva 10934 装满水的气球