首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
mlx
2026年3月19日 17:10
整数排序 题解:
P1905
回复 0
|
赞 2
|
浏览 339
#include<iostream> #include<algorithm> #include<vector> using namespace std; vector<int> nums; bool cmp(int a,int b) { int len1=0,len2=0; int x=abs(a),y=abs(b); while(x) { len1++; x/=10; } while(y) { ...
yauqq
2026年3月15日 21:18
整数排序 题解:
P1905
回复 0
|
赞 1
|
浏览 271
#include<bits/stdc++.h> using namespace std; typedef long long ll; bool cmp(ll a,ll b){ int la = to_string(abs(a)).size(); int lb = to_string(abs(b)).size(); if(la != lb) return la > lb; else return a < b; } int main() { vector<ll> v; ll x; ...
123456pan
2026年3月7日 22:34
整数排序 题解:
P1905
回复 0
|
赞 3
|
浏览 345
#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> using namespace std; bool cmp(string &a, string &b) { int c = a.size(); int d = b.size(); if (a.find("-") != string::npos)c--; if (b....
ryuki
2026年2月13日 10:38
整数排序 题解:vector + sort + 自定义排序给规则
P1905
回复 0
|
赞 10
|
浏览 527
#include <iostream> #include <vector> #include <algorithm> using namespace std; int getlen(int num) { int len = 0; while(num != 0) { num /= 10; len++; } return len; } bool des_bitcnt(int num1, int num2) { int len1 = getlen(n...
奥里给
2025年3月16日 18:37
整数排序 题解:
P1905
回复 0
|
赞 5
|
浏览 1.2k
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <sstream> using namespace std; struct node { int bit; int num; }; bool com(const node &a, const node &b) { if (a.b...
Y969432769845
2025年3月12日 15:01
整数排序 题解:c++超简洁排序
P1905
回复 0
|
赞 7
|
浏览 1.3k
#include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); istringstream iss(s); vector<long long> v; long long x; while (iss >> x) {  ...
RingoCrystal
2025年3月3日 10:45
整数排序 题解:重定义比较或者直接重定义一个结构
P1905
回复 0
|
赞 2
|
浏览 1.2k
#include <bits/stdc++.h> using namespace std; struct newInt{ int a; newInt():a(0){}; newInt(int a):a(a){}; int getlen(newInt x){ int n=x.a; int ans=0; while(n!=0){ ans++; n/=10; } return ans; ...
zxd12363
2024年3月24日 17:15
整数排序 题解:
P1905
回复 0
|
赞 2
|
浏览 1.0k
#include <bits/stdc++.h> using namespace std; int count(int n) { int count = 0; while (n != 0) { count++; n /= 10; } ...
yanmy
2024年3月22日 14:12
简洁
P1905
回复 0
|
赞 6
|
浏览 1.3k
#include <string> #include <sstream> #include <iostream> #include <algorithm> #include <vector> using namespace std; int count(int n) { int count = 0; while (n != 0) { count++; n /= 10; } return count; } bool comp...
小王桐学
2024年3月12日 22:04
整数排序 题解:C
P1905
回复 0
|
赞 8
|
浏览 1.7k
#include <stdio.h> int Figure(int n)//求位数 { int i = 0; while(n) { i++; n/=10; } return i; } void Sort(int a[],int n) { int i,j,t; for(i = 0; i < n-1; i++) for(j = 1; j < n-i; j++) if(Figure(a[j]) > Figure(a[j-1]))//位数比较 { t = a[j]; ...
1
2
题目
整数排序
题解数量
12
发布题解
在线答疑
热门题解
1
1905 整数排序 读入回车跳出while+auto类的迭代器
2
整数排序 题解:
3
整数排序 题解:vector + sort + 自定义排序给规则
4
整数排序 题解:C
5
整数排序 题解:c++超简洁排序
6
简洁
7
整数排序 题解:
8
整数排序 题解:
9
整数排序 题解:重定义比较或者直接重定义一个结构
10
整数排序 题解: