会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
晨阳
导航
博客园
首页
新随笔
联系
订阅
管理
公告
2018年3月24日
c语言 贪吃蛇
摘要: #include#include#include#include #define U 1#define D 2#define L 3 #define R 4 //蛇的状态,U:上 ;D:下;L:左 R:右 typedef struct SNAKE //蛇身的一个节点{...
阅读全文
posted @ 2018-03-24 22:37 ~~晨阳
阅读(150)
评论(0)
推荐(0)
c语言 俄罗斯方块
摘要: #include"graphics.h"#include"time.h"#include"math.h"#include"dos.h"#include"conio.h"#define NULL 0#define False 0#define True 1#defin...
阅读全文
posted @ 2018-03-24 22:37 ~~晨阳
阅读(306)
评论(0)
推荐(0)
Calendar
摘要: CalendarTime Limit: 1 Sec Memory Limit: 64 MBSubmit: 351 Solved: 124[Submit][Status][Discuss]DescriptionA calendar is a system for m...
阅读全文
posted @ 2018-03-24 22:34 ~~晨阳
阅读(210)
评论(0)
推荐(0)
快速幂求余
摘要: int fast_pow(int a,int b,int c){ int ans=1; a%=c; while(b) { if(b&1) ans=a*ans%c; a=a*a%c; ...
阅读全文
posted @ 2018-03-24 22:31 ~~晨阳
阅读(95)
评论(0)
推荐(0)
哈希求众数
摘要: #include int main(){ int a[11]={0},i,j,k,m,max; for(i=1;imax) { max=a[i]; m=i; } } pri...
阅读全文
posted @ 2018-03-24 22:31 ~~晨阳
阅读(109)
评论(0)
推荐(0)
埃氏筛法求素数
摘要: #include int main(){ int a[1001]={0}; int i,j; for(i=2;i<=1000;i++) { if(a[i]==0) { for(j=i+i;j<=1...
阅读全文
posted @ 2018-03-24 22:29 ~~晨阳
阅读(147)
评论(0)
推荐(0)
sort
摘要: sort 头文件 #include + using namespace std;1.一维数组排序#include#include#includeusing namespace std;bool cmp(int a,int b)//如果是double型...
阅读全文
posted @ 2018-03-24 22:28 ~~晨阳
阅读(111)
评论(0)
推荐(0)