1157:[亲和数] 摘要:解题思路:一个函数isequal来判断b是否为a的所有约数的和,是返回1,否返回0;调用函数判断两数是否均为对方的所有约数和;注意事项:参考代码:#include<stdio.h> int iseq…… 题解列表 2021年04月16日 0 点赞 0 评论 191 浏览 评分:0.0
计负均正 模块化 摘要:解题思路:模块化 一个函数功能最好计量单一,独立;注意事项:参考代码#include<stdio.h>int fushu(int a[]){ int b=0,i; for(i=0;i<2…… 题解列表 2021年04月16日 0 点赞 0 评论 404 浏览 评分:9.9
杨辉三角16行代码 简单易懂 摘要:解题思路:注意事项:参考代码:m = input().split() def YH(n): a = [[0]*(1+i) for i in range(n)] for i in …… 题解列表 2021年04月16日 0 点赞 0 评论 1007 浏览 评分:9.9
筛法(赌他不卡我数据 摘要:解题思路:注意事项:参考代码#include <bits/stdc++.h>using namespace std;int a[1001000];int fuck(int x) { int ans =…… 题解列表 2021年04月16日 0 点赞 0 评论 230 浏览 评分:0.0
编写题解 1861: 程序员爬楼梯 摘要:经典动态规划:考虑最后一步f(n)=f(n-1)+f(n-3);参考代码:#include <stdio.h>#include <stdlib.h>int pa(int n){ if(n==1|…… 题解列表 2021年04月16日 0 点赞 0 评论 250 浏览 评分:0.0
(C++代码)简单深搜---慢的一批 摘要: // C++ #include using namespace std; int m; int people[10]; // 记录小朋友的money数 bool vis…… 题解列表 2021年04月16日 0 点赞 0 评论 423 浏览 评分:0.0
DP和最大子序列DP 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; int dp[100001]; int…… 题解列表 2021年04月16日 0 点赞 0 评论 383 浏览 评分:0.0
五次方数递归实现【python】 摘要:# MarkDown编辑器基本使用说明 i=2 def chek(n): if n==0: return 0 else: return …… 题解列表 2021年04月16日 0 点赞 0 评论 474 浏览 评分:0.0
优质题解 全球变暖 DFS解决 C++ 摘要:解题思路: 类似于Flood Fill思路,刚开始我的思路是两次DFS,每次求联通岛屿个数,在两次之间先判断那些点临近海洋'.',将这些点也变成海洋。但没有AC,原因是对于有些岛…… 题解列表 2021年04月16日 0 点赞 0 评论 934 浏览 评分:9.9
简单易懂还是STL香 摘要:#include<bits/stdc++.h> using namespace std; //写一个仿函数 class MyPrint { public: voi…… 题解列表 2021年04月16日 0 点赞 0 评论 147 浏览 评分:0.0