悉野小楼

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

统计

09 2023 档案

Python学习笔记2 常用类型list tuple dict set
摘要:def double(a): """两倍 处理 三个引号可以多行注释, 3个单引号也可以用来多行注释 """ return a * 2 a = double(5) print(a) if isinstance(a, int): #检测是否是某个类型 print("a是整数") print(True 阅读全文

posted @ 2023-09-27 16:29 悉野 阅读(8) 评论(0) 推荐(0) 编辑

Python学习笔记 定义 赋值 条件 循环
摘要:Python 3.12.0 文档 a = "好的, 测试字符tester" b = 17 c = 3 print(a[1:5]) #从第1(包含)个字符取到第5(不包含)个字符 print(a[:3]) #取到第3个字符(不含3) print(a[-5:-1]) #取倒数第5个到倒数第1个 prin 阅读全文

posted @ 2023-09-25 20:08 悉野 阅读(12) 评论(0) 推荐(0) 编辑

vector迭代删除元素
摘要:vector迭代删除元素, vector使用erase删除一个元素后, 数组移动, 原来的迭代器没用了, erase会返回新的iter, 指向当前元素后面的一个元素 #include <iostream> #include <vector> using namespace std; int main 阅读全文

posted @ 2023-09-15 18:12 悉野 阅读(35) 评论(0) 推荐(0) 编辑

归并排序(mege sort)
摘要:参考: https://www.cnblogs.com/kite97/p/13441391.html #include <iostream> #include <vector> #include <algorithm> #include <random> #include <chrono> usin 阅读全文

posted @ 2023-09-08 13:42 悉野 阅读(9) 评论(0) 推荐(0) 编辑

cmd控制台中文乱码
摘要:切换活动页编码 cmd控制台中执行: chcp 65001 C++代码中执行 system("chcp 65001"); 注:CHCP是一个计算机指令,能够显示或设置活动代码页编号。 代码页 描述 65001 UTF-8代码页 950繁体中文 936简体中文默认的GBK 437 MS-DOS美国英语 阅读全文

posted @ 2023-09-04 14:10 悉野 阅读(35) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示