题解列表

筛选

C语言的密码破译通解

摘要:解题思路:利用ASCII码来计算注意事项:参考代码:#include<stdio.h>#include<string.h>#include<ctype.h>int main(){    char* s……

只用最多7次循环,简单易懂

摘要:解题思路:既然每周做的题目是固定的,又知道总和,我们是否可以直接让总和/每周做的题目,得到做了多少个满周,剩下的再按一周的情况(周一至周五加a其余加b)来循环检查呢。注意事项:总和/每周做的题目可能正……

查找二叉树(Java代码)

摘要:package dotcpp; import java.util.*; public class Main {     static int cnt = 0; // 当前节点的编号    ……

二分+floyed算法

摘要:解题思路:floyed算法求所有点对最短距离,用二分算法求答案。时间复杂度:O(n^3*log(n*50000))注意事项:参考代码:#includeusing namespace std;#defi……

1277: Lucky Word

摘要:```cpp #include #include #include #include using namespace std; bool is_prime(int n) { i……

1276: [NOIP2008]立体图

摘要:```cpp #include #include using namespace std; const int N=500; int n,m,h[N][N]; char box[6][8]……

for循环暴力求解

摘要:解题思路:通过for循环遍历所有数求出最大与最小值。注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){    int n;    double……

暴力数组循环(简单明了)

摘要:解题思路:通过三层循环遍历每一种情况,再通过函数判断注意事项:暴力循环得不到满分但是能得一半以上的分。参考代码:#include<stdio.h>#include<string.h>int e=0;i……