题解列表

筛选

二分+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……

利用集合List实现求幸运数(JAVA代码)

摘要:解题思路:开始数字存放放在list集合中list下标0123456数字序列0123456数字序号123456第一轮:幸运数字2(list初始化可以直接填入下列数字序列)list下标0123456数字序……