#include <cstdio>
#include <cstring> using namespace std; int cnt[] , dp[][]; int main()
{
// freopen("a.in" , "r" , stdin);
int T;
scanf("%d" , &T);
while(T--){
for(int i= ; i<= ; i++)
scanf("%d" , cnt+i); memset(dp , , sizeof(dp));
dp[][] = ;
for(int i= ; i<= ; i++){
for(int j= ; j<=cnt[i] ; j++){
if(i*j > ) break;
for(int k=-i*j ; k>= ; k--){
dp[i][i*j+k] += dp[i-][k];
}
}
}
int ans = ;
for(int i = ; i<= ; i++)
ans += dp[][i];
printf("%d\n" , ans);
}
return ;
}

最新文章

  1. dataTables获取当前行json格式数据
  2. web.xml添加编码过滤器
  3. Java Spring的IoC和AOP的知识点速记
  4. OC中的protocol
  5. 【转】ACM/ICPC生涯总结暨退役宣言—alpc55
  6. where,having与 group by连用的区别
  7. PHP乱码问题,UTF-8(乱码)
  8. escape()、encodeURI()、encodeURIComponent() difference
  9. JDBC Thin Driver 的formats三种格式
  10. 017. ADO.NET Connection和command及DataReader
  11. CSS之全屏背景图
  12. MySQL.. ERROR! The server quit without updating PID file问题解决
  13. Android(java)学习笔记170:Activity的生命周期
  14. (转)Mono for Android 优势与劣势
  15. PPT去掉图片白色背景
  16. poj3311(状压dp)
  17. 关于tab选项卡,选项的css问题。
  18. VMware Workstation 12 Pro 之安装林耐斯-Solus-系统
  19. linux服务器情况
  20. FileReader实现图片预览,并上传(js代码)

热门文章

  1. J20170602-ts
  2. bzoj 1801: [Ahoi2009]chess 中国象棋【dp】
  3. poj2096Collecting Bugs(概率期望dp)
  4. [Swift]Set(集)转换为Array(数组)
  5. linux下jdk环境变量配置深度分析----解决环境变量不生效的问题
  6. 认识BACnet协议
  7. 仿QQ局域网聊天软件
  8. 2017杭电多校第七场1011Kolakoski
  9. [转]MySQL存储过程
  10. Windows下重置MySQL密码【MYSQL】