题解列表

筛选

使用pow函数求水仙花数

摘要:#include<stdio.h> #include<math.h> int main() {     int ave, gae;     int k1, k2, k3;     scan……

【C】校门外的树合并重叠区间法

摘要:解题思路: 通过合并重叠区间方式计算,避免巨大数组注意事项: 总树木为长度+1 挖掘树数为初始点-末尾点+1设2个区间为a1~a2,b1~b2 判断重叠方法为b1<=a2 && b2>=a1参考代码:……

1012.字符串分类统计

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ char ch; int letter,number,blank,other; letter=number=b……

1093——字符逆序

摘要:参考代码:#include"stdio.h" #include"string.h" typedef char string[111]; string str; void fun(char *s……

暴力枚举法题解

摘要:解题思路:                本题解采用暴力解法,就是使用多层for循环来求公、母、雏鸡的个数。                原来的思路:使用3层for循环,来枚举这三种

循环入门练习1(简单C++)

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int s=0;     for(int i=……

sizeof的大作用(简单C++)

摘要:#include<iostream> using namespace std; #include<cstdio> int main() {     printf("%d %d %d %d %……

调用数学函数库求解

摘要:解题思路:先输入三个数字,依次求解累加注意事项:注意不要把小数点丢了,这是一个小细节。参考代码:#include<stdio.h> #include<math.h> int main() { ……