首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
18919717626
这个人很懒,什么都没有写...
关注
发消息
文章
20
题解
48
发帖
0
笔记
22
Ta的粉丝
19
关注数
1
粉丝数
19
获赞数
375
阅读数
44924
整数奇偶排序 题解:模板题
#include <bits/stdc++.h> using namespace std; const int maxn = 1000 + 10; int arr[maxn]; bool cmp(int x,int y){ if(x % 2 == 1 &...
P1248
2024年7月6日 21:35
回复 0
|
赞 11
|
浏览 1.1k
进制转换 题解:模板+二进制+字符串的处理
#include <iostream> #include <string.h> #include <algorithm> #include <string> using namespace std; string conve...
P1178
2024年7月6日 21:34
回复 0
|
赞 28
|
浏览 1.3k
字符串排序 题解:sort(s.begin(),s.end())
#include <iostream> #include <algorithm> using namespace std; int main(){ string s; cin >> s; sort(s.begin(),s.end...
P1254
2024年7月6日 21:22
回复 0
|
赞 10
|
浏览 1.0k
最简真分数 题解:最小公倍数+最大公约数
#include <iostream> #include <algorithm> using namespace std; const int N = 1000; int gcdx(int a,int b){ return b ? gcdx(...
P1180
2024年7月6日 21:21
回复 0
|
赞 2
|
浏览 936
01序列 题解:自动+bitset<6>
#include <bits/stdc++.h> using namespace std; string f(int n){ string s = ""; for(int i = 0;i < 6;i ++){ if(n > 0){ ...
P1001
2024年6月30日 16:14
回复 0
|
赞 5
|
浏览 1.1k
整除 题解:简洁版
#include <iostream> using namespace std; int main(){ int cnt = 0; for(int i = 100;i <= 1000;i ++){ if(i % 5 == 0 &&a...
P1007
2024年6月30日 15:48
回复 0
|
赞 38
|
浏览 2.6k
排序 题解:sort
#include <iostream> #include <algorithm> using namespace std; const int N = 1010; int s[N]; int n; int main(){ cin >...
P1010
2024年6月30日 15:26
回复 0
|
赞 8
|
浏览 1.0k
A+B问题 题解:int范围为1e9,long long范围为1e18,不会爆
#include <iostream> using namespace std; typedef long long LL; int main(){ LL a,b; cin >> a >> b; cout <...
P1000
2024年6月30日 15:01
回复 0
|
赞 5
|
浏览 1.2k
杨辉三角形 题解:写的可能复杂了点,易懂
#include <iostream> using namespace std; const int N = 1010; int s[N][N]; int main(){ int n; while(cin >> n){ for...
P1062
2024年6月29日 19:50
回复 0
|
赞 5
|
浏览 949
首字母大写 题解:
#include <iostream> using namespace std; int main(){ string s; while(getline(cin,s)){ if(s[0] >= 'a' && s[0] <...
P1240
2024年6月29日 19:40
回复 0
|
赞 9
|
浏览 1.0k
进制转换2 题解:
浮点数运算误差:pow 函数在计算较大整数幂时可能会引入浮点数误差,导致结果不准确。 #include <iostream> #include <string> using namespace std; typedef long ...
P1259
2024年6月29日 19:33
回复 0
|
赞 3
|
浏览 1.9k
利润提成 题解:
#include <iostream> using namespace std; double calculate_bonus(double profit) { double bonus = 0; if (profit <= 100000)...
P1040
2024年6月29日 19:15
回复 0
|
赞 3
|
浏览 744
求1到n的和 题解:
#include <iostream> using namespace std; typedef long long LL; int main(){ int n; LL ans = 0; cin >> n; for(int i...
P1133
2024年6月29日 19:08
回复 0
|
赞 3
|
浏览 1.0k
计算Sn 题解:
#include <iostream> using namespace std; typedef long long LL; int main(){ int x,n; cin >> x >> n; LL ans ...
P1043
2024年6月29日 18:23
回复 0
|
赞 9
|
浏览 1.4k
取模运算 题解:快速幂模板+本题题解
模板 // 快速幂取模函数,计算 (a^k) % p int qmi(int a, int k, int p) { int res = 1; while (k > 0) { if (k % 2 == 1) // 如果 k 的最低位为1 ...
P5133
2024年6月29日 17:10
回复 0
|
赞 27
|
浏览 1.1k
二叉树的深度 题解:数组实现方法
#include <iostream> using namespace std; const int N = 1e5 + 10; int pos,len,t,cnt = 0; char tree[N]; // 存储树的数组 char str[N]; ...
P4356
2024年6月29日 16:13
回复 0
|
赞 10
|
浏览 869
集合中的相同元素 题解:数据量比较小,用好几个数组实现
#include <iostream> #include <string.h> #include <algorithm> using namespace std; const int N = 1e5 + 10; int a[N],b[N...
P5105
2024年6月29日 15:16
回复 0
|
赞 4
|
浏览 1.2k
细菌繁殖问题 题解:数学问题
#include <iostream> using namespace std; int main(){ int n; cin >> n; while(n --){ int x; cin >> x; ...
P5126
2024年6月29日 14:20
回复 0
|
赞 1
|
浏览 567
n个数的最小公倍数 题解:gcd+lcm,遍历即可
#include <iostream> using namespace std; const int N = 101; int a[N]; int gcd(int a,int b){ return b ? gcd(b,a % b) : a; } ...
P3684
2024年6月29日 14:10
回复 0
|
赞 9
|
浏览 705
密码的翻译 题解:简单的字符串处理
#include <iostream> using namespace std; int main(){ string s; while(cin >> s){ for(int i = 0;i < s.size();i ++){ ...
P3502
2024年6月29日 13:49
回复 0
|
赞 5
|
浏览 846
1
2
3
本科学校:苏州大学
目标学校:苏州大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!