摘要: 一定要注意strlen函数的正确使用 在已经明确定义char大小时,strlen将给出已定大小,而不是截止到'\0' 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <math.h> 5 #inc 阅读全文
posted @ 2023-03-20 14:24 雨中白发人 阅读(18) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <math.h> 5 6 int main() 7 { 8 int n; 9 scanf("%d", &n); 10 char id[n][19]; 阅读全文
posted @ 2023-03-20 09:11 雨中白发人 阅读(18) 评论(0) 推荐(0)
摘要: 关键是qsort函数和滑动窗口 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <math.h> 5 int max(int a, int b) 6 { 7 return a > b ? a : 阅读全文
posted @ 2023-03-20 01:05 雨中白发人 阅读(19) 评论(0) 推荐(0)