python最长字符串 带解析 摘要:s=list(input().split()) #以列表方式存储Max=len(s[0]) #记录字符串最大长度 首先记录第一个n=[] #记录字符串最大长度对应字符的下标n.append(0) #首…… 题解列表 2023年02月19日 0 点赞 0 评论 345 浏览 评分:9.9
大臣的旅费-两次dfs+邻接矩阵或邻接表 摘要:# 树的直径问题,图中所有最短路径的最大值即为直径,两次dfs即可求出 ## 邻接矩阵 这题可以使用dfs+邻接矩阵来做,不过会导致内存超限只能80分。 ``` import java.u…… 题解列表 2023年02月19日 0 点赞 0 评论 539 浏览 评分:9.9
666666666666666666 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<cstring>using namespace std;const int N=1e…… 题解列表 2023年02月20日 0 点赞 0 评论 288 浏览 评分:9.9
1030: [编程入门]二维数组的转置 摘要:```cpp #include using namespace std; /* 题目描述 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换。 输入格式 一个3x3的矩阵 输…… 题解列表 2023年02月20日 0 点赞 1 评论 444 浏览 评分:9.9
题解 2831: 画矩形 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { char ch; int i, j, h, l, flag; //h,高,l,长;flag为空…… 题解列表 2023年02月20日 0 点赞 0 评论 346 浏览 评分:9.9
题解 2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> int isPrime(int n) { int i, k; k = (i…… 题解列表 2023年02月20日 1 点赞 1 评论 541 浏览 评分:9.9
1033: [编程入门]自定义函数之字符提取 摘要:```cpp #include #include #include using namespace std; /* 题目描述 写一函数,将一个字符串中的元音字母复制到另一个字符串,然后输…… 题解列表 2023年02月20日 0 点赞 1 评论 352 浏览 评分:9.9
蓝桥杯2022年第十三届省赛真题-GCD 摘要:解题思路://考察gcd性质,根据更相减损术可以知道一个等式:gcd(a,b)=gcd(a,b-a) 当然这里的前提时a<=b;//所以gcd(a+k,b+k)=gcd(a+k,b-a) 这里的a…… 题解列表 2023年02月20日 0 点赞 0 评论 1824 浏览 评分:9.9
最最最简单的一种方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[3][3]; int i,j; //int t; for(i=0;i<3;i…… 题解列表 2023年02月21日 0 点赞 0 评论 477 浏览 评分:9.9
新手版,简单易懂 摘要:解题思路:循环赋值注意事项:转换类型参考代码: Scanner scanner = new Scanner(System.in); int shuru = scanner.…… 题解列表 2023年02月21日 0 点赞 2 评论 233 浏览 评分:9.9