题解列表

筛选

Hanoi双塔问题(c语言实现)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>  void n2(double ar[], int n);//函数求2^n并储存在数组int main(){    int n;   ……

The 3n + 1 problem

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include<math.h>int main(){ int a,b; int i = 0; int x; while (scan……

C++老管家的忠诚(线段树做法)

摘要:区间查询,果断想到线段树,看了一下题解有很多用的st表,但感觉st表模板太难记了,线段树相对好记很多,还是线段树更香一点。树状数组也可以求最值但得改模板。参考代码:#include using nam……

利用类型转换解Hello, world!

摘要:解题思路:利用char,把int类型转换为char类型即可注意事项:参考代码:#include<iostream>using namespace std;int main(){int a = 0;wh……

A+B for Input-Output Practice (I)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){   int a,b;   while(cin>>a>>b)   cou……

1290: 奶牛的锻炼

摘要:解题思路:注意事项:说实话没怎么看懂!参考代码:#include <iostream>using namespace std;int main(){    //d[i]代表第i分钟可以跑的路程    ……

数的划分(深搜)

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int n, m, ans; void dfs(int k,int s……