1931: 蓝桥杯算法提高VIP-逆序排列 这是一道非常基础的题目,有多种写法,本方法不一定是最好的解法。注意审题,问题应该不是很大importjava.util.ArrayList;importjava.util.Scanner;publicclass_1931_蓝桥杯算法提高VIP_逆序排列{publicstaticvoidmain(Str 题解列表 2022年03月08日 0 点赞 0 评论 934 浏览 评分:9.9
Hifipsysta-1716-数据结构-快速排序(C++代码) ```cpp#includeusingnamespacestd;constintMXN=1e5+10;intarr[MXN];intPartition(intleft,intright){inttemp=arr[left];while(left 题解列表 2022年03月08日 0 点赞 0 评论 625 浏览 评分:0.0
Hifipsysta-2020-快速排序练习(C++代码) ```cpp#includeusingnamespacestd;constintMXN=1e5+10;intarr[MXN];intPartition(intleft,intright){inttemp=arr[left];while(left 题解列表 2022年03月08日 0 点赞 0 评论 589 浏览 评分:0.0
信息学奥赛一本通T1268-完全背包问题 摘要:#include<iostream>using namespace std;int dp[10000];int w[205],c[205];int main(){ int m,n; cin…… 题解列表 2022年03月08日 0 点赞 0 评论 581 浏览 评分:8.0
知道组数求a+b的和 摘要:解题思路:用 n 来跳出循环即可注意事项:参考代码:#include<stdio.h>int main(){ int a,b,n; scanf("%d",&n); while(~sc…… 题解列表 2022年03月08日 0 点赞 0 评论 583 浏览 评分:0.0
优质题解 1108: 守望者的逃离 解题思路:算是动态规划,但贪心一样可以做,就是蓝够就用闪烁,蓝不够就根据剩余蓝量、剩余时间、剩余距离决定是跑步还是闪烁。核心思想总结来说就是:每秒的当前总位移是选择闪烁(分为位移和休息)和选择跑步两者间的最大值。注意事项:需要理解的地方是:blink[i]=blink[i-1]+60;和move[i] 题解列表 2022年03月08日 7 点赞 0 评论 2301 浏览 评分:9.0
蓝桥杯算法提高VIP-数组替换C++ ```cpp#include#includeusingnamespacestd;constintN=100000;inta[N],b[N];voidadd(inta[],intm,intb[],intn){intx=m,y=0;for(inty=0;y 题解列表 2022年03月08日 0 点赞 0 评论 756 浏览 评分:9.9 编写题解 1032: [编程入门]自定义函数之字符串连接--字符串连接函数(strcat) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void strCat(char str1[],char str2[]){ printf("%…… 题解列表 2022年03月08日 0 点赞 0 评论 553 浏览 评分:0.0 题解 1206: 字符串问题 摘要:解题思路:1.首先,定义一个字符串2.运用gets函数输入3.获得字符串的长度4.字符串的长度与数组的实际为序大15.从后向前输出字符串注意事项:参考代码:#include<stdio.h> #in…… 题解列表 2022年03月08日 0 点赞 0 评论 617 浏览 评分:0.0 编写题解 1032: [编程入门]自定义函数之字符串连接--神奇的是这种方法内存还小 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void strCat(char str1[],char str2[]){ for(int i…… 题解列表 2022年03月08日 0 点赞 0 评论 458 浏览 评分:0.0 « 12...3526352735283529353035313532...59085909 »
编写题解 1032: [编程入门]自定义函数之字符串连接--字符串连接函数(strcat) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void strCat(char str1[],char str2[]){ printf("%…… 题解列表 2022年03月08日 0 点赞 0 评论 553 浏览 评分:0.0
题解 1206: 字符串问题 摘要:解题思路:1.首先,定义一个字符串2.运用gets函数输入3.获得字符串的长度4.字符串的长度与数组的实际为序大15.从后向前输出字符串注意事项:参考代码:#include<stdio.h> #in…… 题解列表 2022年03月08日 0 点赞 0 评论 617 浏览 评分:0.0
编写题解 1032: [编程入门]自定义函数之字符串连接--神奇的是这种方法内存还小 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void strCat(char str1[],char str2[]){ for(int i…… 题解列表 2022年03月08日 0 点赞 0 评论 458 浏览 评分:0.0