题解 1219: 数列排序 ###解题思路根据题目的输出格式,输入的时候,将比K1小的数存进栈(先进后出),将比K1大的数存进队列(先进先出);输出的时候按照顺序输出栈里的元素、K1和队列里的元素###学习笔记```cppstd::ios::sync_with_stdio(0);//在c++中之所以cin, 题解列表 2022年04月01日 0 点赞 0 评论 1033 浏览 评分:9.9
一种很笨的方法——1560: 蓝桥杯算法提高VIP-计算器 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int g[10][10], n, sum;char a[110], b[110];int m…… 题解列表 2022年04月01日 0 点赞 0 评论 541 浏览 评分:0.0
【鼠鼠】用两层循环ac一道中等题 1.核心思路贪心,最少步数的办法是找到相同的字符,通过删除和修改达到一致2.比如sfdxbqw和gfdgw,只要把一样的留下,不一样的在第二字符串个长度之前就改,在第二个字符串之后出现的不一样的直接删掉3.这样第一行不用修改(包括增删改)的只有和第二行重复了的字符4.因此最少修改步数就是第一行的长度减 题解列表 2022年04月01日 0 点赞 0 评论 690 浏览 评分:0.0
题解 1218: 排列之STL大法 用数组b记录数组a的下标然后使用next_permutation()函数得到数组a的元素顺序的全排列参考资料:https://blog.csdn.net/qian2213762498/article/details/79683905参考代码#include#include 题解列表 2022年04月01日 0 点赞 0 评论 814 浏览 评分:9.9 最大公约数与最小公倍数模板 摘要:#include <stdio.h> int gcd(int a,int b) { if(b==0)return a; else return gcd(b,a%b); } int ma…… 题解列表 2022年04月01日 0 点赞 0 评论 525 浏览 评分:9.9 【鼠鼠】用getline和getchar两个函数ac一道简单题 1.首先阅读题目仔细点,输出是要空两行的2.getline(cin,string)真的太好用辣,碰到换行和EOF才停的3.getchar()用来作为输入空格的接收函数```cpp#include#include#include#includeusingnamespacestd;intmain(){in 题解列表 2022年04月01日 0 点赞 0 评论 690 浏览 评分:0.0 有手就行之数组插入 摘要:解题思路:用手注意事项:参考代码:#include<stdio.h>int main(){ int a[10],i,j,m; for(i=0;i<9;i++) { scanf("%d",…… 题解列表 2022年04月01日 0 点赞 0 评论 563 浏览 评分:9.9 二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int gcd(int x,int y){ int t; t = x%y…… 题解列表 2022年04月01日 0 点赞 0 评论 589 浏览 评分:0.0 不用数组版C语言-计负均正 摘要:解题思路:输一个判断一个注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n=0,m; double…… 题解列表 2022年04月01日 0 点赞 0 评论 662 浏览 评分:7.0 计负均正c++(新手勿喷) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int num[100]; int count …… 题解列表 2022年04月01日 0 点赞 0 评论 543 浏览 评分:9.9 « 12...2274227522762277227822792280...59125913 »
最大公约数与最小公倍数模板 摘要:#include <stdio.h> int gcd(int a,int b) { if(b==0)return a; else return gcd(b,a%b); } int ma…… 题解列表 2022年04月01日 0 点赞 0 评论 525 浏览 评分:9.9
【鼠鼠】用getline和getchar两个函数ac一道简单题 1.首先阅读题目仔细点,输出是要空两行的2.getline(cin,string)真的太好用辣,碰到换行和EOF才停的3.getchar()用来作为输入空格的接收函数```cpp#include#include#include#includeusingnamespacestd;intmain(){in 题解列表 2022年04月01日 0 点赞 0 评论 690 浏览 评分:0.0
有手就行之数组插入 摘要:解题思路:用手注意事项:参考代码:#include<stdio.h>int main(){ int a[10],i,j,m; for(i=0;i<9;i++) { scanf("%d",…… 题解列表 2022年04月01日 0 点赞 0 评论 563 浏览 评分:9.9
二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int gcd(int x,int y){ int t; t = x%y…… 题解列表 2022年04月01日 0 点赞 0 评论 589 浏览 评分:0.0
不用数组版C语言-计负均正 摘要:解题思路:输一个判断一个注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n=0,m; double…… 题解列表 2022年04月01日 0 点赞 0 评论 662 浏览 评分:7.0
计负均正c++(新手勿喷) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int num[100]; int count …… 题解列表 2022年04月01日 0 点赞 0 评论 543 浏览 评分:9.9