摘要: 一定要注意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)
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #include<math.h> 5 6 int main() 7 { 8 char ch1[81],ch2[81]; 9 scanf("%s",ch1); 10 scan 阅读全文
posted @ 2023-03-19 21:56 雨中白发人 阅读(13) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <math.h> 5 6 typedef struct people 7 { 8 char name[6]; 9 int year; 10 int 阅读全文
posted @ 2023-03-19 00:50 雨中白发人 阅读(11) 评论(0) 推荐(0)
摘要: ac 但写得就像坨答辩 过两天我自己都忘了这些变量用来干嘛的了 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 #include <math.h> 5 6 int main() 7 { 8 int num[1000 阅读全文
posted @ 2023-03-18 20:26 雨中白发人 阅读(14) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 3 int main(){ 4 int c1,c2; 5 scanf("%d%d",&c1,&c2); 6 int ans = c2-c1; 7 8 if(ans%100>=50){ 9 ans=ans/100+1; 10 }else{ 11 ans = 阅读全文
posted @ 2023-03-18 16:49 雨中白发人 阅读(18) 评论(0) 推荐(0)
摘要: 目前无法ac过最后一个测试点,其余ac,原因是有无效节点存在,但这个代码加上去除无效节点函数时便会运行超时 还没想出来怎么做,先这样吧 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> typed 阅读全文
posted @ 2023-03-04 02:04 雨中白发人 阅读(29) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int a[10]; for (int i = 0; i < 10; i++) { scanf("%d", &a[i]) 阅读全文
posted @ 2023-03-03 18:06 雨中白发人 阅读(16) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define N 100 int main() { int a,b,d; scanf("%d %d %d",&a,&b,&d); int num[N]; 阅读全文
posted @ 2023-03-03 17:33 雨中白发人 阅读(21) 评论(0) 推荐(0)