1169: 绝对值排序 摘要:解题思路:一个数若为负数,则这个数的绝对值等于它的相反数;若为非负数,则为它本身; 我们可以定义两个数组sum和sum2,sum用来存放原数,sum2存放绝对值; …… 题解列表 2023年10月14日 0 点赞 0 评论 324 浏览 评分:9.9
2850: 输出亲朋字符串 摘要:参考代码:#include <bits/stdc++.h> using namespace std; char str2[300]; int tong[150]; int main() { …… 题解列表 2023年10月14日 0 点赞 0 评论 393 浏览 评分: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 评论 509 浏览 评分:9.9
模仿高手的代码 摘要:import sys N = 101 inf = 0x3f3f3f3f def prim(n, m, mapp): vis = [False] * N dis =…… 题解列表 2023年10月14日 0 点赞 0 评论 265 浏览 评分:9.9
暴力最大子矩阵(超时了) 摘要:解题思路:纯暴力此题用Python会超时,建议改用C/C++提交,方法都是一样的注意事项:参考代码:def SUM(i,j,x,y): # list子矩阵中的左上点和右下点 s …… 题解列表 2023年10月14日 0 点赞 0 评论 316 浏览 评分:9.9
带参数宏定义,交换数值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define Swap(x,y,t) (t=x,x=y,y=t) int main(){ int a,b,c; scanf…… 题解列表 2023年10月15日 0 点赞 0 评论 340 浏览 评分:0.0
宏定义的练习 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define Division(a,b) (a)%(b)int main(){ int a,b; scanf("%d %d"…… 题解列表 2023年10月15日 0 点赞 0 评论 307 浏览 评分:0.0
宏定义练习之三角形面积 摘要:解题思路:已知三边可用海伦公式注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(x,y,z) ((x)+(y)+(z))/2.0#define …… 题解列表 2023年10月15日 0 点赞 0 评论 255 浏览 评分:0.0
宏定义之找最大数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define Max(a,b,c) a>b?(a>c?a:(b>c?b:c)):(b>c?b:c) int main(){ fl…… 题解列表 2023年10月15日 0 点赞 0 评论 263 浏览 评分:0.0