2909: 直方图 C++ 摘要:解题思路:注意事项:const int 常量(不会改变)cnt[a[i]] cnt 数量参考代码:#include<bits/stdc++.h>using namespace std…… 题解列表 2023年12月12日 0 点赞 0 评论 443 浏览 评分:0.0
2880: 计算鞍点 ```#includeusingnamespacestd;constintN=1000,M=100000;inta[N][N],dx[6],dy[6];intmain(){for(inti=1;ia[i][j];}}for(inti=1;i 题解列表 2023年12月12日 0 点赞 0 评论 477 浏览 评分:0.0
C++代码实现 摘要:解题思路:sort排序,C++代码实现注意事项:参考代码:#include<iostream>#include<algorithm>#include<string>using namespace st…… 题解列表 2023年12月13日 0 点赞 0 评论 425 浏览 评分:0.0
纸张尺寸(python硬核解法) 摘要:解题思路:给定了初始纸张的尺寸,后面按照思路一步一步来就行,直接看注释参考代码:import math #因为题目要求向下取整,所以要导入math模块 p = list(input()) …… 题解列表 2023年12月13日 0 点赞 0 评论 557 浏览 评分:0.0
选择排序python 摘要:解题思路: 选择排序的时间复杂度是O(n^2),其中n是待排序元素的数量。这是因为选择排序的基本操作是交换和比较,而每次交换和比较都需要遍历整个数组,因此时间复杂度为O(n^2)题意直接…… 题解列表 2023年12月13日 0 点赞 0 评论 580 浏览 评分:0.0
c代码记录之剔除相关数(不用指针感觉写的好麻烦,太多循环与排序) 整体思路:1.将每个整数的每位数字从小到大排序好,便于整数比较或字符串比较(这里用的字符串比较)2.创建二维字符串数组str,盛放排序好的整数串3.创建一维数组num,盛放原数,下标和串数组str对应4.处理串数组str,将相等的串置为“xgs”(相关数)5.创建一维数组fxgs, 题解列表 2023年12月13日 0 点赞 0 评论 540 浏览 评分:0.0
结构体之成绩记录,中规中矩 摘要:解题思路:注意事项:注意格式的输出参考代码:#include<stdio.h>int main(){ struct LC { char a[10]; char b[10]; int c[3]; …… 题解列表 2023年12月13日 0 点赞 0 评论 752 浏览 评分:0.0
2827:计算多项式的导函数 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args…… 题解列表 2023年12月13日 0 点赞 0 评论 632 浏览 评分:0.0
c代码记录之二进制转换(无二进制输出格式,长除法将十进制转换成二进制) 摘要: #include int main() { int num[32],n,i,m,j; while(~scanf("%d",&n)){ …… 题解列表 2023年12月13日 0 点赞 0 评论 605 浏览 评分:0.0
统计2出现的次数(python简单方法) 摘要:解题思路:用for循环将数字已字符串的形式添加到列表中,用count函数统计2的数量参考代码:L, R = map(int, input().split()) num_list = [] for …… 题解列表 2023年12月13日 0 点赞 0 评论 495 浏览 评分:0.0