1169: 绝对值排序 摘要:解题思路:一个数若为负数,则这个数的绝对值等于它的相反数;若为非负数,则为它本身; 我们可以定义两个数组sum和sum2,sum用来存放原数,sum2存放绝对值; …… 题解列表 2023年10月14日 0 点赞 0 评论 252 浏览 评分:9.9
2850: 输出亲朋字符串 摘要:参考代码:#include <bits/stdc++.h> using namespace std; char str2[300]; int tong[150]; int main() {…… 题解列表 2023年10月14日 0 点赞 0 评论 338 浏览 评分:9.9
懂得都懂,不懂的我也不解释了 摘要:def max(a,b):return a if a>b else b w, u, lt = [0] * 21, [0] * 501, [0] * 21 t, d = [[0] * 21 for …… 题解列表 2023年10月14日 0 点赞 0 评论 425 浏览 评分:9.9
模仿高手的代码 摘要:import sys N = 101 inf = 0x3f3f3f3f def prim(n, m, mapp): vis = [False] * N dis =…… 题解列表 2023年10月14日 0 点赞 0 评论 194 浏览 评分:9.9
暴力最大子矩阵(超时了) 摘要:解题思路:纯暴力此题用Python会超时,建议改用C/C++提交,方法都是一样的注意事项:参考代码:def SUM(i,j,x,y): # list子矩阵中的左上点和右下点 s …… 题解列表 2023年10月14日 0 点赞 0 评论 253 浏览 评分:9.9
水无月C语言版本 摘要:**题目链接:**[题目 1150: C语言训练-计算t=1+1/2+1/3+...+1/n](https://www.dotcpp.com/oj/problem1150.html) **解题思路:…… 题解列表 2023年10月15日 0 点赞 0 评论 307 浏览 评分:9.9
优质题解 求1+2+3+...+n的值(C++代码) 摘要:这道题是我们在学习for循环(**1**),while循环(**2**),包括函数(**3**)的学习过程中都会遇到的一道经典题目,所以我们介绍下面的**五**种方法。至于第四,五种方法我们卖个关子,…… 题解列表 2023年10月15日 0 点赞 0 评论 566 浏览 评分:9.9
优质题解 N以内累加求和(c++代码) 摘要:这道题是我们在学习for循环(**1**),while循环(**2**),包括函数(**3**)的学习过程中都会遇到的一道经典题目,所以我们介绍下面的**五**种方法。至于第四,五种方法我们卖个关子,…… 题解列表 2023年10月15日 1 点赞 1 评论 1103 浏览 评分:9.9
石头剪刀布python程序写法 摘要:解题思路:a,b=map(int,input().split())if a==b: print("0")elif a>b: if a==2 and b==0: print("…… 题解列表 2023年10月15日 0 点赞 0 评论 497 浏览 评分:9.9
floyd算法,代码简介明了 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<algorithm>using namespace std;const int N…… 题解列表 2023年10月15日 0 点赞 0 评论 294 浏览 评分:9.9