UVA-10128
来源:互联网 发布:java 微信 编辑:程序博客网 时间:2024/06/10 23:49
#include <iostream>#include <stdio.h>#include <string.h>#include <algorithm>using namespace std; int dp[20][20][20];int main(){ dp[1][1][1]=1; for(int i=2;i<=13;i++) for(int j=1;j<=i;j++) for(int k=1;k<=i;k++) dp[i][j][k]=(dp[i-1][j][k])*(i-2)+dp[i-1][j-1][k]+dp[i-1][j][k-1]; int T; cin>>T; while(T--){ int N,P,R; scanf("%d%d%d",&N,&P,&R); cout<<dp[N][P][R]<<endl; } return 0;}
0 0
- uva 10128
- UVA 10128
- UVA-10128
- UVa 10128
- uva 10128 队伍
- UVA 10128 Queue
- UVA 10128 Queue
- UVA 10128 - Queue(dp)
- UVa 10128 Queue (DP)
- UVA - 10128 Queue
- UVA-10128 Queue
- uva
- UVA
- UVA
- UVA
- uva
- UVA
- UVA
- Linux中进程控制块(PCB)的task_struct结构描述
- Hibernate缓存浅析
- 《转》ScrollView中嵌套ListView和Viewpager问题
- [02]使用 JavaScript
- Longest Substring Without Repeating Characters(最长无重复子字符串算法)
- UVA-10128
- UVA-12563
- UVA-580
- 用Apache POI读取Excel并下载
- express 路由
- LeetCode:maximum-depth-of-binary-tree
- 30:Remove Duplicates from Sorted List
- lua + openresty web API 框架
- express.static 作用及用法