题解列表

筛选

1738: 排序(c++代码)

摘要:sort函数直接排,真不错 ```cpp #include #include using namespace std; int main() { int n; whil……

记忆化搜索(Python题解)

摘要:解题思路:注意事项:参考代码:def dfs(n,step):    for i in range(n//2+1):        if exist[i]: # 存在直接用            ta……

用栈实现八进制转换

摘要:```c #include #include typedef struct Stack { int data[100]; int top; }*Stack,stack; //入栈 ……

1048: [编程入门]自定义函数之字符串拷贝

摘要:解题思路:注意事项:在这个示例代码中,我们使用函数来分别读入数字n、一行字符串和数字m。 然后,我们使用函数将从第个字符开始的子串打印出来,并输出结果。scanfprintfm需要注意的是,在函数中,……

牛吃牧草问题——数学问题思路

摘要:解题思路:    设每头牛一天能吃n份量的草,原有草地有s份量的草,每天新增a份量的草。    则牛吃草的总量会等于新增的草+原有的草。        对于15头牛吃的20天的草,牛吃草总量为 15n……

鸡尾酒疗法c++

摘要:解题思路:注意事项:    样例过了的话,可能是没有换行,加上换行就对了参考代码:#include<bits/stdc++.h>using namespace std;int main(){     ……

数组输出(C语言)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){    int i,j;    int a[100][100];    for(i……

救援C++ 简单易懂,欢迎点评

摘要:解题思路:注意事项: ceil()为向上取整函数参考代码:#include<bits/stdc++.h>#include<cmath>using namespace std;int main(){  ……