2684: 蓝桥杯2022年第十三届省赛真题-数位排序-sort 摘要: #include #include using namespace std; bool cmp(int x,int y){ int sum1=0…… 题解列表 2024年04月08日 3 点赞 0 评论 145 浏览 评分:10.0
数位排序 c++ 摘要:#include using namespace std; int n,m; const int N=1e6; vectorpi; int han(int x) { int sum=…… 题解列表 2024年04月06日 0 点赞 0 评论 127 浏览 评分:0.0
sort函数妙解数位排序 摘要:解题思路:在sort函数中添加优化的比较函数cmp注意事项:数组要比十万大一点参考代码:#include <iostream> #include<algorithm> using namespac…… 题解列表 2024年03月28日 0 点赞 0 评论 70 浏览 评分:0.0
2684: 蓝桥杯-数位排序(暴力+重载小于号) 摘要:**在结构体中直接重载小于号可以不用写额外的排序函数,直接调用sort即可** 感觉速度还挺快的,测试数据中时间最长为169ms,但是结构体会比较占内存,最大内存消耗9900KB ```cpp …… 题解列表 2024年03月25日 0 点赞 0 评论 157 浏览 评分:0.0
sort排序自定义 摘要:#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int n, m; struct node { …… 题解列表 2024年03月20日 0 点赞 0 评论 106 浏览 评分:9.9
蓝桥杯2022年第十三届省赛真题-数位排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int i,n,m,t,s; cin>>n>>m…… 题解列表 2024年03月05日 0 点赞 0 评论 157 浏览 评分:0.0
数位排序 运用sort自定义排序 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;bool cmp(int a,int b){ int a…… 题解列表 2023年11月24日 0 点赞 1 评论 228 浏览 评分:9.9
数位排序暴力 摘要:解题思路:暴力注意事项:无参考代码:#pragma GCC optimize(3) #include <bits/stdc++.h> using namespace std; #define e…… 题解列表 2023年11月10日 0 点赞 0 评论 338 浏览 评分:9.9
蓝桥杯2022年第十三届省赛真题-数位排序 摘要:解题思路:vector变长数组。注意事项:不要超时。参考代码:#include <iostream>#include <vector>#include <set>#include <string>#i…… 题解列表 2023年04月02日 0 点赞 0 评论 444 浏览 评分:9.9
利用c++结构体重构小于计算来使用sort排序 摘要:解题思路:创建结构体用number存储数值,len存储各各数位相加的结果。根据题意定义小于运算,然后可以直接使用c++内置的sort函数进行排序。注意事项:参考代码:#include<bits/std…… 题解列表 2023年03月17日 0 点赞 0 评论 369 浏览 评分:9.9