题解列表

筛选

开心的金明 (C++代码)

摘要:解题思路:注意事项:     直接递归会超时,用上状态转移参考代码:#include<bits/stdc++.h>using namespace std;const  int N = 25;int v……

最多约数问题 (C++代码)

摘要:解题思路:类似素数筛的思路一个数是n的约数 那么这个数乘x必定等于n 这样就可以一次求出所有数的因数时间复杂度 O(n*lg(n))注意事项:注意数组大小,1不要去筛 本身不要去筛,浪费时间,反正大家……

The 3n + 1 problem (C语言代码)

摘要:解题思路:注意事项:相信很多人踩雷在了  当输入的n>m的情况上了参考代码:#include <stdio.h>#include <string.h>int main(){    int n,m,i,……

字符串问题 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>int main(){ using namespace std; char a[255]; int ……

You are my brother (C语言代码)

摘要:解题思路:贴个代码 不想写注释了注意事项:参考代码:#include<stdio.h>typedef struct node{ int a; int b;} L;L A[1005];int main(……