会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
✿北辰✿
博客园
首页
新随笔
联系
管理
订阅
2021年1月1日
C++小游戏:五子棋(含代码)
摘要: 怎样用c++做出五子棋呢? 其实很简单,不需要很多算法和函数,下面展示代码(注释都在下面了): #include<bits/stdc++.h> #include<windows.h> #include<conio.h> #include<ctime> //注意,使用以下系统函数,请加上这些头文件 u
阅读全文
posted @ 2021-01-01 21:32 ✿北辰✿
阅读(18942)
评论(0)
推荐(0)
2020年8月19日
C++:简单的跑酷
摘要: //用C++实现一个简单的跑酷:游戏规则:@是你,.是终点,#是怪物(碰到会扣血1),a键左移,d键右移,j键攻击可杀死怪物(不是怪物回扣血1),初始血量为2 //代码: #include<bits/stdc++.h>#include<windows.h>using namespace std;in
阅读全文
posted @ 2020-08-19 16:15 ✿北辰✿
阅读(10184)
评论(0)
推荐(0)
C++:吃豆人加强版2.0
摘要: //比上个版本地图扩大路线增多: #include<bits/stdc++.h>#include<windows.h>using namespace std;int main() { printf("你能用最短的路线让吃豆人吃到豆子么?\n") ; char mp[10][10]= { "*****
阅读全文
posted @ 2020-08-19 15:47 ✿北辰✿
阅读(1235)
评论(0)
推荐(0)
C++:吃豆人加强版1.0
摘要: //加强之后,地图更改并新增一条规则:你能用最短的路线让吃豆人吃到豆子么? //以下是代码: #include<bits/stdc++.h>#include<windows.h>using namespace std;int main() { printf("你能用最短的路线让吃豆人吃到豆子么?\n
阅读全文
posted @ 2020-08-19 15:31 ✿北辰✿
阅读(993)
评论(0)
推荐(0)
C++:吃豆人简易版
摘要: //用c++实现吃豆人: #include<bits/stdc++.h>#include<windows.h>using namespace std;int main() { char mp[7][7]= { "******", "*@ *", "* *", "* *", "* .*", "****
阅读全文
posted @ 2020-08-19 15:19 ✿北辰✿
阅读(2132)
评论(1)
推荐(0)
2020年8月18日
c++算法:移动的小人
摘要: //怎样在c++里实现让小人移动呢?这当然不可能,但我们可以用清屏重新输出来模拟: #include<bits/stdc++.h>#include<windows.h>//只有加入这个头文件才能使用system函数using namespace std;int main() { char ps[4]
阅读全文
posted @ 2020-08-18 18:04 ✿北辰✿
阅读(1630)
评论(0)
推荐(0)
2020年8月13日
洛谷P1160 队列安排
摘要: //一道简单的队列题,用数组模拟队列 #include<cstdio>#include<cstring>int a[100010][3],n,m;int main(){ scanf("%d",&n); int j=1; memset(a,0,sizeof(a)); a[1][1]=1; for(in
阅读全文
posted @ 2020-08-13 19:58 ✿北辰✿
阅读(274)
评论(1)
推荐(0)
2020年8月12日
洛谷P5035 金坷垃
摘要: //题目特特...水...,可以用快速幂做,上代码: #include<bits/stdc++.h> using namespace std; int main() { long long b,p,k,s,t; cin>>p; if(p-1==0) { cout<<1; return 0; } p-
阅读全文
posted @ 2020-08-12 18:56 ✿北辰✿
阅读(197)
评论(0)
推荐(0)
洛谷P1540 机器翻译
摘要: //题目难度是普及,我是用queue做的比较省代码,上代码 #include<bits/stdc++.h>using namespace std;queue<int> q;int m,n,ans;bool inq[1010];int main() { cin>>m>>n; for(int i=1;
阅读全文
posted @ 2020-08-12 18:51 ✿北辰✿
阅读(136)
评论(0)
推荐(0)
洛谷P1554 梦中的统计
摘要: //题目很水,上代码 #include<cstdio>#include<iostream>using namespace std;int main() { long long m,n,s0=0,s1=0,s2=0,s3=0,s4=0,s5=0,s6=0,s7=0,s8=0,s9=0; int i,j
阅读全文
posted @ 2020-08-12 18:45 ✿北辰✿
阅读(198)
评论(0)
推荐(0)
公告