• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
庸人自扰扰
博客园 首页 新随笔 联系 订阅 订阅 管理

2016年2月29日

hdu 2052
摘要: PS:竟然一次AC....惊喜...注意每个实例后跟一个空行.. 学到一个快速清空数组的用法...memst函数. memst(void *s,char a,sizeof n) 把 s里面的前n个变成a 顺便在后面贴上一个大神的ac代码 代码: #include "stdio.h"void darm 阅读全文
posted @ 2016-02-29 23:19 庸人自扰扰 阅读(193) 评论(0) 推荐(0)
 
hdu 2051
摘要: ps:这道题是题目坑爹了...题目说不考虑n=0的...但其实要考虑...醉了 中文意思:输入一个10进制的数,输出他的二进制数 代码: #include "stdio.h"int main(){ int n,i,a[1000],num; while(~scanf("%d",&n)){ num=0; 阅读全文
posted @ 2016-02-29 23:01 庸人自扰扰 阅读(278) 评论(0) 推荐(0)
 
模拟发布五福
摘要: PS:老师叫弄得一个模拟发布五福代码,要求 1.敬业福发布的概率是其他的0.1倍 2.敬业福的数量不超过10张,且每次都保存 //就是程序退出以后还是保存数据 代码: 阅读全文
posted @ 2016-02-29 22:41 庸人自扰扰 阅读(207) 评论(0) 推荐(0)
 
hdu 2047
摘要: PS:又是上课偷懒..去递推。。 代码: #include "stdio.h"#include "math.h"long long dp[55];long long xp[55];int main(){ int i,n; dp[0]=3; xp[0]=1; for(i=1;i<55;i++){ xp 阅读全文
posted @ 2016-02-29 22:29 庸人自扰扰 阅读(188) 评论(0) 推荐(0)
 
hdu 2045
摘要: Ps:上课的时候用iPad做的...没有调试..一次AC机。就是简单的递推... 代码: #include "stdio.h"#include "math.h"long long dp[55];int main(){ int i,n; dp[0]=6; for(i=1;i<55;i++){ dp[i 阅读全文
posted @ 2016-02-29 14:18 庸人自扰扰 阅读(180) 评论(0) 推荐(0)
 
hdu 2041
摘要: ps:这道题之前一直没思路,有大神提醒我用递推,但当时没搞清...今天做了那个小蜜蜂..才懂得用递推做这道题.. 代码: #include "stdio.h"long long dp[45];int main(){ int i,n,m; dp[0]=1; dp[1]=2; for(i=2;i<45; 阅读全文
posted @ 2016-02-29 00:51 庸人自扰扰 阅读(145) 评论(0) 推荐(0)
 
hdu 2044
摘要: ps:好吧,WA了两次,第一次注意到要用long long了...但是printf那里给忘了...又WA。。 代码:#include "stdio.h"long long dp[55];int main(){ int n,i,a,b; dp[0]=1; dp[1]=2; dp[2]=3; for(i 阅读全文
posted @ 2016-02-29 00:35 庸人自扰扰 阅读(169) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3