1096: Minesweeper Padding(inspired by CV) 简洁版 摘要:解题思路:给原矩阵中增加一个padding即可避免判断“需要找几个邻居”的问题(灵感来源于计算机视觉中的Padding操作)注意事项:参考代码:counter = 1 while 1: r…… 题解列表 2021年02月25日 0 点赞 0 评论 458 浏览 评分:9.9
弟弟的作业 C语言 摘要:```c int main() { char b; int a,c,d,k; int sum=0; while(~(k=scanf("%d%c%d=%d",&a,&b,&c,&…… 题解列表 2021年02月25日 0 点赞 0 评论 588 浏览 评分:6.0
完数的判断 摘要:解题思路:利用一个一维数组来记录每个完数的因数,因为较大完数的因数一定比上一个完数的因数数量多,所以每次循环可以不用初始化数组;如果不按照样例输出,后两个for循环可以并为一个,初始思路就是每对因数存…… 题解列表 2021年02月25日 0 点赞 0 评论 398 浏览 评分:9.9
1110: 2^k进制数(C语言代码) 递归回溯 摘要:解题思路:这道题用回溯思想比较好理解,因为每一位都比右边一位小,所以从左到右逐位确定比较方便确定每一位数都要递归一次,每一个递归里都有一个循环,从本位的最小值(前一位的值加一)循环到最大值循环内继续向…… 题解列表 2021年02月25日 0 点赞 0 评论 445 浏览 评分:0.0
自定义函数之字符提取 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void copy(char a[], char b[]){ int length,j=0; len…… 题解列表 2021年02月25日 0 点赞 0 评论 278 浏览 评分:0.0
次数差(java) 摘要:import java.util.*; public class Main{ public static void main(String[] args) { HashM…… 题解列表 2021年02月24日 0 点赞 0 评论 320 浏览 评分:0.0
自己写的 思路很简单并且也很好解决 摘要:解题思路注意事项:注意gets和puts参考代码: char s[100]; gets(s); int i=0; while(s[i]!='\0') { …… 题解列表 2021年02月24日 0 点赞 0 评论 630 浏览 评分:0.0
//C++sstream流, string 转int 摘要:解题思路: n个2,可以用string.substr(n--) 来截取各个数,再利用sstream流将string转int 再累加,完成。参考代码:#include<iostream>#include…… 题解列表 2021年02月24日 0 点赞 0 评论 413 浏览 评分:9.9
(C语言代码)关键是要减少循环 摘要: #include <string.h> #include <stdio.h> #include <stdlib.h> #include <math.h> int fun(const v…… 题解列表 2021年02月24日 0 点赞 1 评论 432 浏览 评分:4.7
并不简简单单的进行阶乘循环,这个考虑点主要在溢出!!!!! 摘要:解题思路:当输入20时,数据很大long long都无法显示,会溢出,但是我们考虑到long long 可以存下20的阶乘,但是并不能存下20的阶乘加上19的阶乘......加上1的阶乘,那么我们就利…… 题解列表 2021年02月24日 0 点赞 0 评论 252 浏览 评分:9.9