上一页 1 2 3 4 5 6 7 8 ··· 12 下一页
函数名称 说明 double sqrt(double x) 返回x的平方根 double pow(double x, double y) 返回x的y次幂 Read More
posted @ 2025-02-18 10:35 靖意风 Views(6) Comments(0) Diggs(0)
函数声明 说明 int tolower(int c) 将大写字母转化成小写字母 int toupper(int c) 将小写字母转化成大写字母 int islower(int c) 检查字母是否是小写字母 int isupper(int c) 检查字母是否是大写字母 int isdigit(int Read More
posted @ 2025-02-18 10:31 靖意风 Views(15) Comments(0) Diggs(0)
函数要有高效性和易用性 4.1 函数的基本内容 查看strindex()的实现,该功能和strstr()类似, 都是查找子串的位置 int strindex(char s[], char t[]) { int idx, i, j; for (idx = 0; s[idx] != '\0'; idx+ Read More
posted @ 2025-02-11 23:31 靖意风 Views(10) Comments(0) Diggs(0)
1. 动态规划的题目可以从 回溯 推导得到。一般动态规划的题目 给定的数据个数很多,如果只用回溯会超时,此时可以通过数据存储已经计算的数据,即记忆化搜索。通过记忆化搜索,便于理解 dp表的简化 2. 对于0-1背包和完全背包,都可以简化二维dp表。以0-1背包举例,假设二维dp表的横坐标是tgt(其 Read More
posted @ 2025-01-21 22:25 靖意风 Views(14) Comments(0) Diggs(0)
1. scanf()原型 int scanf(const char *format) char arr[100] = {}; scanf("%s", arr); // 遇到空格,输入就结束了 scanf("%[^\n]\n"); // 遇到空格不结束,遇到换行才结束; 并且把'\n'去掉,不会影响后 Read More
posted @ 2025-01-11 23:07 靖意风 Views(28) Comments(0) Diggs(0)
1.5 字符输入和输出 如下两个输入和输出函数,是基础版本,它们可以以扩充出很多版本int getchar(void)int putchar(int char) 1.5.3 行统计 #include <stdio.h> void main() { int ch, nl = 0; while ((ch Read More
posted @ 2025-01-09 10:45 靖意风 Views(18) Comments(1) Diggs(0)
1.keil 软件编译后,会提示 如下信息,需要了解确认,避免自己程序占用RAM或ROM太大 Program Size: data=9.0 xdata=1024 code=17 网上查阅 data xdata code 区域的大小,已经存放的内容。data 一般是RAM的低128B地址空间,xdat Read More
posted @ 2025-01-05 23:19 靖意风 Views(503) Comments(0) Diggs(0)
1. 翻转数组的元素,之前我都是取中间值,然后ix< (right + 1 - left)/2, 这样考虑较繁琐。使用双指针,很简洁 void proc(int *arr, int left, int right) { for (int ix = left, jx = right; ix < jx; Read More
posted @ 2025-01-01 22:46 靖意风 Views(37) Comments(0) Diggs(0)
函数名称 说明 char *strcat(char *dest, const char *src) char *strpbrk(const char *str1, const char *str2) 检索字符串 str1 中第一个 出现在str2 中字符,不包含空结束字符。也就是说,依次检验字符串 Read More
posted @ 2024-12-24 09:52 靖意风 Views(32) Comments(0) Diggs(0)
1. 使用普中科技的51开发板A4型号,结合 江协科技的视频 keil 软件的芯片 选择microchip系列的 89C52然后stc-isp软件 下载烧录选择 STC89C516RD+/LE516RD+ 2. 在对矩阵键盘编写扫描代码时,想简化成如下代码。感觉这是分层思想的体现,如下可认为是驱动代 Read More
posted @ 2024-12-21 12:49 靖意风 Views(38) Comments(0) Diggs(0)
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页