题解列表

筛选

2861-验证子串

摘要:解题思路:实际上本题用到了数据结构的思想,采用最传统的暴力法,不断的比较注意事项:参考代码:int main(){ char s1[201]; char s2[201]; int len1……

[竞赛入门]简单的a+b

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a=0,b=0;    while(~scanf("%d%d", &a, &b))   //下面有……

2848-基因相关性

摘要:解题思路:注意事项:如果本题采用gets()的输入方法,那么会一直报错,不清楚为什么。scanf()就不会报错。参考代码:#include<stdio.h> #include<string.h> ……

2868-最长最短单词

摘要:解题思路:注意事项:请各位朋友帮忙指正,测试的时候只有91分。参考代码:struct Test{ char s[105]; int n; }; int main(){ struct T……

自由下落的距离计算

摘要:#include <stdio.h>  int main(){ int N,i; float M,sum=0.0; scanf("%f%d",&M,&N);  sum+=M; f……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int n, max,num;    while (scanf("%d", &n) != EOF)    ……

利用数组、for、if解决问题

摘要:解题思路:利用第二个数组存放元音字母。注意事项:由于b数组未初始化值,所以需要在最后加上‘\0’作为字符串结束符。参考代码:#include<stdio.h> #include<string.h>……