hdu2069

选取硬币组成定值,暴力

 #include<stdio.h>
int v[]={,,,,,}; int main(){
int n;
while(scanf("%d",&n)!=EOF){
int ans=,ans1=;
for(int i=n/;i>=;i--){
for(int j=(n-*i)/;j>=;j--){
for(int k=(n-*i-*j)/;k>=;k--){
for(int q=(n-*i-*j-*k)/;q>=;q--){
ans1=i+j+k+q+n-i*-j*-k*-q*;
if(ans1<=)ans++;
}
}
}
}
printf("%d\n",ans); }
return ;
}

hdu2070

斐波那契数列

 #include<stdio.h>
int main()
{
int n,i;
long long a[]={,};
for (i=;i<=;i++) a[i]=a[i-]+a[i-];
while (scanf("%d",&n)!=EOF&&n!=-)
{
printf ("%I64d\n",a[n]);
}
return ;
}

hdu2071

求数列最大值

 #include<stdio.h>
int main()
{
int t;
while (scanf("%d",&t)!=EOF)
{
int i;
for (i=;i<=t;i++)
{
int n,j;
scanf("%d",&n);
double a[],m;
for (j=;j<=n;j++) scanf("%lf",&a[j]);
m=a[];
for (j=;j<=n;j++) if (m<a[j]) m=a[j];
printf("%.2lf\n",m);
}
}
return ;
}

hdu2069-2071的更多相关文章

  1. ural 2071. Juice Cocktails

    2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and ...

  2. HDU 2071 Max Num

    http://acm.hdu.edu.cn/showproblem.php?pid=2071 Problem Description There are some students in a clas ...

  3. loj#2071. 「JSOI2016」最佳团体

    题目链接 loj#2071. 「JSOI2016」最佳团体 题解 树形dp强行01分规 代码 #include<cstdio> #include<cstring> #inclu ...

  4. 杭电oj2031、2033、2070、2071、2075、2089、2090、2092、2096-2099

    2031  进制转换 #include<stdio.h> #include<string.h> int main(){ int n,i,r,x,j,flag; ]; while ...

  5. hdu 2071

    Ps:输出n个数里最大的 #include "stdio.h" int main(){ ],max; int i,j,n,t; while(~scanf("%d" ...

  6. HDOJ 2071 Max Num

    Problem Description There are some students in a class, Can you help teacher find the highest studen ...

  7. zoj 2071 Technology Trader 最大权闭合子图

    传送门 和上一题一样, 也是一个最大权闭合子图.不过建图好麻烦的感觉  写了好久. 源点和原材料连边, 权值为val. 汇点和产品连边, 权值为val. 产品与和它有关系的材料连边, 权值inf. 最 ...

  8. hdoj:2071

    Max Num Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Sub ...

  9. 【LOJ】#2071. 「JSOI2016」最佳团体

    题解 01分数规划,二分加树背包-- 代码 #include <bits/stdc++.h> #define enter putchar('\n') #define space putch ...

  10. hdu2069(Coin Change)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2069 Coin Change Time Limit: 1000/1000 MS (Java/Other ...

随机推荐

  1. mysql 问题 Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdb

    异常错误:Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.c ...

  2. Android设计模式之工厂模式

    定义 工厂模式是我们最常用的实例化对象模式了,是用工厂方法代替new操作的一种模式.著名的Jive论坛 ,就大量使用了工厂模式,工厂模式在Java程序系统可以说是随处可见.因为工厂模式就相当于创建实例 ...

  3. dubbo监控报错Error creating bean with name 'uriBrokerService'

    在jdk1.8下面会出现此错误 解决方法: 1.更换服务器jdk版本.(会影响其他项目环境) 2.修改dubbo-admin tomcat默认jdk版本. 3.修改dubbo-admin项目依赖(de ...

  4. sql去重;同一条数据出现多条取一条的sql语句

    理论上相同数据个别字段值不同重复问题: 1.某字段重复,其他字段值不同时,按重复字段分组只取一条的sql语句(eg:相同的数据某个字段值有差别导致存储两条或多条无意义重复数据的情况)select s. ...

  5. BlockingQueue-----多线程(一)

    前言: 在新增的Concurrent包中,BlockingQueue很好的解决了多线程中,如何高效安全“传输”数据的问题.通过这些高效并且线程安全的队列类,为我们快速搭建高质量的多线程程序带来极大的便 ...

  6. POJ 3259 Bellman_Ford算法

    额.关键是读题.反正我是看了解题报告才知道意思的.给你n个点.m条路.双向的.耗费时间.w个虫洞.单向的.时间为负值.问你是否可以从某一点返回看到之前的自己.即为判断是不是有负环.用Bellman_F ...

  7. DevExpress v17.2新版亮点—Mobile Controls篇

    用户界面套包DevExpress v17.2日前终于正式发布,本站将以连载的形式为大家介绍各版本新增内容.本文将介绍了Mobile Controls v17.2 的新功能,快来下载试用新版本! New ...

  8. L219 China's office workers consider further education, training essential

    More than 90 percent of China's office workers consider on-the-job training and continuing education ...

  9. 导出导入grafana完整的dashboard(非单个图表)

    导出很简单,如下图操作即可 导入

  10. diary of django

    1.安装django -> pip install django ----- 某些时候竟然需要FQ 2.JsonResponse 需要    (不需要了,django.http自带) pip i ...