大等于n的最小完全平方数 摘要: #include using namespace std; int main() { int n; cin>>n; for(i…… 题解列表 2022年04月08日 0 点赞 0 评论 718 浏览 评分:9.9
简单的字符串-题解c语言 摘要:#include <stdio.h> int main (void){ int count=0,n;// count 是循环进行的次数,n是需要进行的次数 int i,t=1; // i 是…… 题解列表 2022年04月08日 0 点赞 1 评论 634 浏览 评分:9.9
暴搜 DFS走迷宫 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int N=35,M=35;bool vis[N][N];int ans…… 题解列表 2022年04月08日 0 点赞 0 评论 492 浏览 评分:0.0
带记录的dfs 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int N=8;int g[N][N];bool vis[N][N];i…… 题解列表 2022年04月08日 0 点赞 0 评论 324 浏览 评分:0.0
自定义函数处理素数易懂 摘要:解题思路:1,2是特别的数单独处理,然后再对其他数进行处理注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,su…… 题解列表 2022年04月08日 0 点赞 0 评论 593 浏览 评分:9.9
C语言训练-求具有abcd=(ab+cd)2性质的四位数(python版) 摘要:解题思路:注意事项:参考代码:for i in range(1000,10000): #遍历四位数 a = i//100 #分离出千位和百位 b = i % 100 #分离出十位…… 题解列表 2022年04月08日 0 点赞 0 评论 529 浏览 评分:0.0
C语言训练-求PI*(python版) 摘要:解题思路:注意事项:参考代码:import mathsum = 0i = 1k = 0n = 1while math.fabs(n) >= 10**(-6): #控制循环 sum += n…… 题解列表 2022年04月08日 0 点赞 0 评论 401 浏览 评分:0.0
题解 1627: 蓝桥杯算法训练VIP-拦截导弹(JAVA Dilworth定理) 摘要:解题思路:Dilworth定理:偏序集的最少反链划分数等于最长链的长度对于本题来说, 把数列划分成最少的不上升子序列个数等于数列的最长单调增长度使用线段树O(nlogn)使用dp O(n2)注意事项:…… 题解列表 2022年04月08日 0 点赞 0 评论 547 浏览 评分:0.0
回文数字(有详解,自认比较好懂,当然代码还可以更简洁) 摘要:解题思路:主函数用for循环i从10000~999999,判断函数judge(i)内,(1)先分五位数和六位数两种情况判断是不是回文数字,是->flag=1,否->直接返回0(这个放到下面的判断中的e…… 题解列表 2022年04月08日 0 点赞 0 评论 419 浏览 评分:0.0
左孩子右兄弟 递归 摘要:参考代码:import java.util.*; public class Main { public static Map<Integer, List<Integer>> nodeT…… 题解列表 2022年04月08日 0 点赞 0 评论 490 浏览 评分:8.0