1074,直接通过模运算来解决 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int isM(char *n) { int …… 题解列表 2025年05月01日 0 点赞 1 评论 229 浏览 评分:10.0
set与stringstream字符串流 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ …… 题解列表 2025年05月01日 1 点赞 0 评论 147 浏览 评分:10.0
单词个数统计(C++) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ …… 题解列表 2025年05月01日 1 点赞 0 评论 214 浏览 评分:10.0
明明的随机数(set容器自动排序和去重) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){&…… 题解列表 2025年05月01日 1 点赞 0 评论 198 浏览 评分:10.0
三种方法求解斐波那契数列 摘要:方法一:递推法#include<bits/stdc++.h>usingnamespacestd;intmain(){&nbs…… 题解列表 2025年05月01日 0 点赞 0 评论 217 浏览 评分:10.0
画展布置-排序 摘要:解题思路这个问题要求我们从N幅画中选择M幅,并排列它们,使得相邻画作艺术价值平方的差的绝对值之和最小。首先,我们可以观察到,对于任意两幅画的艺术价值a和b,|a² - b²| = |a-b|·|a+b…… 题解列表 2025年05月02日 2 点赞 0 评论 367 浏览 评分:10.0
只有50分的看过来 摘要:解题思路: 思路无非就是找到最小值和最大值的下标,然后根据下标分别与第一个数和最后一个数进行交换注意事项: 题目要求的交换其实有先后顺序,即先将第一个数和最小值交换,再将最后一个数和最大值交换,这就会…… 题解列表 2025年05月03日 0 点赞 0 评论 307 浏览 评分:10.0
T1017 完数判断 摘要:解题思路:注意事项:参考代码:n=int(input())for a in range(2,n+1,2): b=[1] for i in range…… 题解列表 2025年05月04日 0 点赞 0 评论 365 浏览 评分:10.0
菜鸟记录11111111 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b=0,c[5]; scanf(&q…… 题解列表 2025年05月06日 4 点赞 1 评论 707 浏览 评分:10.0
水质检测-dp 摘要:解题思路题目要求在一个2×n的河床上增加最少的检测器,使得所有检测器互相连通。河床用一个2×n的字符矩阵表示,其中'#'表示已有检测器,'.'表示空白位置。如果两个检测…… 题解列表 2025年05月07日 3 点赞 0 评论 365 浏览 评分:10.0