c语言3010: 奇偶数之和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i = 1; int n; int sum1 = 0; int sum2 = 0; scanf("%d"…… 题解列表 2022年12月01日 0 点赞 0 评论 633 浏览 评分:9.9
题解 2900: 螺旋加密 摘要:解题思路:用a数组螺旋填写,b数组记录字符串代表的数字,d数组表示数字对应的五位二进制,c数组用来标记是否填写过。注意事项:利用了位运算参考代码:#include <algorithm>#includ…… 题解列表 2022年12月02日 0 点赞 0 评论 751 浏览 评分:9.9
2911: 连续出现的字符 ```cpp#include#includeusingnamespacestd;intmain(){intk,s=0;charch[100000],che;cin>>k>>ch;for(inti=0;i 题解列表 2022年12月02日 0 点赞 0 评论 649 浏览 评分:9.9
2912: 最长平台 摘要:```cpp #include using namespace std; int main() { int n,count=1,max=1,a[1001]; cin>>n;…… 题解列表 2022年12月02日 0 点赞 0 评论 749 浏览 评分:9.9
2924: 明明的随机数 摘要:```cpp #include using namespace std; void QS(int a[],int l,int r) { if(l>=r) retur…… 题解列表 2022年12月02日 0 点赞 0 评论 595 浏览 评分:9.9
2922: 合影效果 ```cpp#include#include#includeusingnamespacestd;typedefstructM{strings;floath;}S;boolcmp(Sa,Sb){if(a.s!=b.s)returna.s>b.s;elseif(a.s==b.s&&a.s=="male") 题解列表 2022年12月02日 0 点赞 0 评论 604 浏览 评分:9.9
【Python】1984: 蓝桥杯算法提高VIP-求圆面积表面积体积 摘要:注意事项:格式化输出参考代码:r = float(input()) pi = 3.1415926536 s1 = pi*r**2 s2 = 4*pi*r**2 v = 4*pi*r**3/3 …… 题解列表 2022年12月02日 0 点赞 0 评论 1142 浏览 评分:9.9
【Python】编写题解 1981: 输出M到N的数 摘要:注意事项:利用range()函数循环输出参考代码:M, N = map(int, input().split()) if M<N: for i in range(M+1, N+1): …… 题解列表 2022年12月02日 0 点赞 0 评论 526 浏览 评分:9.9
3050: 最长上升子序列(线性dp) 题目描述:给定一个长度为N的数列,求数值严格单调递增的子序列的长度最长是多少。解题思路:线性dp1.状态表示:所有以i结尾的严格单调上升的子序列的长度的集合(MAX)2.状态计算:只需要判断在严格单调上升的前提下,枚举以倒数第二个元素为结尾的上升子序列长度和加上第i个元素的长度求一个最大值就行。 题解列表 2022年12月02日 0 点赞 0 评论 1016 浏览 评分:9.9
时间复杂度O(n)的算法 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;#define maxn 100010//−100000≤ Ai ≤100000ty…… 题解列表 2022年12月02日 0 点赞 0 评论 571 浏览 评分:9.9