摘要: 今天学习了Java的基础语法😇😇😇 阅读全文
posted @ 2023-07-09 22:57 aallofitisst 阅读(8) 评论(0) 推荐(0)
摘要: pta第八题 ``` #include #include int main() { int A, B; std::cin >> A >> B; int sum = 0; int count = 0; for (int i = A; i <= B; i++) { std::cout << std::s 阅读全文
posted @ 2023-07-08 19:52 aallofitisst 阅读(11) 评论(0) 推荐(0)
摘要: pta第三题 统计1000以内数字个数 用map容器即可实现,每个数字为key,它们出现次数为value,而数字可以用字符串来存储 代码实现 ``` #include #include int main() { std::string N; std::cin >> N; std::map digit 阅读全文
posted @ 2023-07-06 20:08 aallofitisst 阅读(13) 评论(0) 推荐(0)
摘要: 类和对象: Java是面向对象的编程语言,所有的代码都应该包含在类中。 类是对象的蓝图,描述了对象的属性和行为。 使用关键字 class 声明类,通过实例化类创建对象。 方法和函数: 方法是类中执行特定任务的一组语句。 在类中定义方法,可以在其他地方调用执行。 方法由名称、参数列表和方法体组成,可以 阅读全文
posted @ 2023-07-04 19:44 aallofitisst 阅读(22) 评论(0) 推荐(0)
摘要: 周一 玩游戏 周二 去姥姥家 周三 玩游戏 周四 出去玩 周五博客如下 ``` #include struct TreeNode { int val; TreeNode* left; TreeNode* right; bool leftThread; // 标识左子树是否为线索 bool right 阅读全文
posted @ 2023-06-29 22:20 aallofitisst 阅读(13) 评论(0) 推荐(0)
摘要: ![](https://img2023.cnblogs.com/blog/3168894/202305/3168894-20230528165838837-1584184076.png) ``` #include #include #include using namespace std; type 阅读全文
posted @ 2023-05-28 16:58 aallofitisst 阅读(12) 评论(0) 推荐(0)
摘要: ``` #include using namespace std; typedef struct tree { char data; tree* lchild; tree* rchild; }tree; //递归实现创建树 void creatTree(tree*& root) { char ch; 阅读全文
posted @ 2023-05-27 17:56 aallofitisst 阅读(11) 评论(0) 推荐(0)
摘要: ``` #include #include #include using namespace std; //暴力匹配 void force_match(string& a, string& b) { int i = 0, j = 0; while (i = b.size()) { cout buil 阅读全文
posted @ 2023-05-25 23:48 aallofitisst 阅读(26) 评论(0) 推荐(0)
摘要: ``` //循环队列可存储数据数量是maxsize-1 //队列长度为(front-rear+maxsize)%maxsize //队列为空时front==rear //队列满时 (front+1)%maxsize==rear; #define MAXSIZE 5 #include using na 阅读全文
posted @ 2023-05-24 13:24 aallofitisst 阅读(13) 评论(0) 推荐(0)
摘要: 修复上一篇中的bug 1.蛇的尾巴删除后,更新地图 2.设计链表使得蛇链接起来,从而在尾部释放并更新最后一个节点 function.h ``` #pragma once #include #include #include #include #include #include #include #i 阅读全文
posted @ 2023-05-24 01:16 aallofitisst 阅读(38) 评论(0) 推荐(0)