2909: 直方图 C++ 摘要:解题思路:注意事项:const int 常量(不会改变)cnt[a[i]] cnt 数量参考代码:#include<bits/stdc++.h>using namespace std…… 题解列表 2023年12月12日 0 点赞 0 评论 339 浏览 评分:0.0
编写题解 1505: 蓝桥杯算法提高VIP-单词个数统计 摘要:解题思路:注意事项:参考代码:word_list = list(input().split()) print(len(word_list))…… 题解列表 2023年12月12日 0 点赞 0 评论 448 浏览 评分:0.0
用头文件更快捷 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<ctype.h>int main(){ char s[300]; ge…… 题解列表 2023年12月12日 0 点赞 0 评论 374 浏览 评分:6.0
c语言递归解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gcd(int a,int b){ (a%b==0) ? return b : return gcd(b,a%b)…… 题解列表 2023年12月12日 0 点赞 0 评论 347 浏览 评分:9.9
题解 1738: 排序 摘要:下面是选择排序 #include using namespace std; int a[5010]; int main() { int n; …… 题解列表 2023年12月12日 0 点赞 1 评论 468 浏览 评分:9.9
1738: 排序 C++! 摘要:解题思路:std::sort 最坏时间复杂度0(nlogn)注意事项:参考代码:#includeusing namespace std;int a[5000];int main(){ int n;…… 题解列表 2023年12月12日 1 点赞 0 评论 418 浏览 评分:0.0
分数列奇偶来分别分析,易于看懂。 摘要:解题思路: 将数列分奇数列和偶数列,最大生长数其实就是2*m-2,也就是循环一次即可,而数列两边实对称的,由此可得。注意事项: 注意m在循环中的取值,切记数组底数从零开始参考代码:#include…… 题解列表 2023年12月12日 0 点赞 0 评论 422 浏览 评分:0.0
字符数组解Tom数 摘要:解题思路:因为int范围最高到2的31次方-1,所以改为数组注意事项:参考代码: char str[100]; while(~scanf("%s",str)) { int l,su…… 题解列表 2023年12月12日 0 点赞 0 评论 344 浏览 评分:0.0
汽水瓶(Java代码) 摘要: /*此题需不断输入n的值,故while循环更简便,因需判断n的范围,而按顺序需先输入n,则使用dowhile循环。因每2个空瓶借1瓶便抵消一瓶,故2瓶算作1瓶,同时1瓶无法兑换,所以可以看作换…… 题解列表 2023年12月12日 0 点赞 0 评论 362 浏览 评分:9.9
年龄与疾病 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[]args…… 题解列表 2023年12月12日 0 点赞 0 评论 625 浏览 评分:9.9