会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
wangys
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
···
16
下一页
2023年12月9日
vector 容器
摘要:
阅读全文
posted @ 2023-12-09 09:20 王ys
阅读(13)
评论(0)
推荐(0)
2023年12月2日
饭卡管理系统&结构体(+本地存储)
摘要: #include<iostream> #include <fstream> using namespace std; struct card{ string name; int id; int money; bool build_card(int x_id,string x_name){ name=
阅读全文
posted @ 2023-12-02 10:01 王ys
阅读(50)
评论(0)
推荐(0)
2023年11月17日
运算3
摘要: #include <iostream> using namespace std; int main(int argc, char** argv) { string n; int x=0; int n1,n2; getline(cin,n); if(n.find(" ")>=0&&n.find(" "
阅读全文
posted @ 2023-11-17 20:01 王ys
阅读(20)
评论(0)
推荐(0)
2023年11月12日
运算2
摘要: #include <iostream> using namespace std; int main(int argc, char** argv) { string n; int x=0; int n1,n2; getline(cin,n); if(n.find(" ")>=0&&n.find(" "
阅读全文
posted @ 2023-11-12 09:40 王ys
阅读(9)
评论(0)
推荐(0)
2023年11月11日
运算
摘要: #include <iostream> using namespace std; int main(int argc, char** argv) { string n; int x=0; int n1,n2; getline(cin,n); if(n.find(" ")>0&&n.find(" ")
阅读全文
posted @ 2023-11-11 10:03 王ys
阅读(16)
评论(0)
推荐(0)
2023年11月4日
地盘划分 递归
摘要: 地盘划分【例】将一个给定的矩形划分为一个个正方形,其规则是先从矩形中划分出一个尽可能大的正方形,接下来,在剩下的矩形中再划分出一个尽可能大的一个正方形,以此类推。例如,宽*长为3*4的矩形,最少可划分为4个正方形,也就是说。取走一个3*3的正方形后,将问题规模变成3*1,然后变为2*1,最后变为1*
阅读全文
posted @ 2023-11-04 09:36 王ys
阅读(60)
评论(0)
推荐(0)
阶乘 递归
摘要: #include <iostream> using namespace std; int m(int n){ if(n<=1){ return 1; }else{ return n*m(n-1); } } int main(){ int a; cin>>a; cout<<m(a); return 0
阅读全文
posted @ 2023-11-04 09:34 王ys
阅读(13)
评论(0)
推荐(0)
斐波那契数列 递归
摘要: #include <iostream> using namespace std; int m(int n){ if(n<=2){ return 1; }else{ return m(n-1)+m(n-2); } } int main(){ int a; cin>>a; cout<<m(a); ret
阅读全文
posted @ 2023-11-04 09:33 王ys
阅读(8)
评论(0)
推荐(0)
2023年11月3日
文件流代码
摘要: #include <iostream> #include <fstream> using namespace std; int main(int argc, char** argv) { // char data[100]; // ofstream out; // out.open("lll.txt
阅读全文
posted @ 2023-11-03 20:03 王ys
阅读(10)
评论(0)
推荐(0)
2023年10月29日
斐波那契数列&数值传递
摘要: #include <iostream> using namespace std; int p1(int a){ if(a<=2){ return 1; }else{ return p1(a-1)+p1(a-2); } } int main(){ int n; cin>>n; cout<<p1(n);
阅读全文
posted @ 2023-10-29 09:46 王ys
阅读(8)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
16
下一页
公告