首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
camling
这个人很懒,什么都没有写...
关注
发消息
文章
0
题解
44
发帖
0
笔记
22
Ta的粉丝
18
关注数
1
粉丝数
18
获赞数
334
阅读数
25606
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
|
浏览 789
整除 题解:简洁版
#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
|
赞 35
|
浏览 1.1k
排序 题解: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
|
浏览 760
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
|
浏览 992
杨辉三角形 题解:写的可能复杂了点,易懂
#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
|
赞 4
|
浏览 721
首字母大写 题解:
#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
|
浏览 766
进制转换2 题解:
浮点数运算误差:pow 函数在计算较大整数幂时可能会引入浮点数误差,导致结果不准确。 #include <iostream> #include <string> using namespace std; typedef long ...
P1259
2024年6月29日 19:33
回复 0
|
赞 3
|
浏览 822
利润提成 题解:
#include <iostream> using namespace std; double calculate_bonus(double profit) { double bonus = 0; if (profit <= 100000)...
P1040
2024年6月29日 19:15
回复 0
|
赞 3
|
浏览 603
求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
|
浏览 821
计算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
|
赞 8
|
浏览 993
取模运算 题解:快速幂模板+本题题解
模板 // 快速幂取模函数,计算 (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
|
赞 24
|
浏览 751
二叉树的深度 题解:数组实现方法
#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
|
赞 9
|
浏览 560
集合中的相同元素 题解:数据量比较小,用好几个数组实现
#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
|
赞 3
|
浏览 552
细菌繁殖问题 题解:数学问题
#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
|
浏览 464
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
|
浏览 533
密码的翻译 题解:简单的字符串处理
#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
|
浏览 673
简单的背包问题 题解:01背包的变式
首先我们来看标准的01背包问题 有 N 件物品和一个容量是 V 的背包。每件物品只能使用一次。 第 i件物品的体积是 vi,价值是 wi 求解将哪些物品装入背包,可使这些物品的总体积不超过背包容量,且总价值最大。 输出最大价值。 输入格式 第一行两个整数,...
P5129
2024年6月29日 13:42
回复 0
|
赞 29
|
浏览 899
奇数还是偶数 题解:不用解释
#include <iostream> using namespace std; int main(){ int n; cin >> n; if(n % 2 == 1){ cout << "odd number" &l...
P2007
2024年6月28日 21:47
回复 0
|
赞 3
|
浏览 606
括号匹配的问题 题解:栈 + 简单判断
#include <iostream> #include <stack> using namespace std; int main(){ string s; cin >> s; stack<char> st; ...
P4933
2024年6月28日 21:39
回复 0
|
赞 8
|
浏览 562
单词翻转 题解:栈:先进后出 + 单词分离
本题的特性就是先输入的单词最后输出,还伴随着识别单词的过程,可以使用数据结构栈进行解题 #include <iostream> #include <stack> using namespace std; int main(){ stack&l...
P3666
2024年6月28日 21:27
回复 0
|
赞 13
|
浏览 566
1
2
3
本科学校:郑州大学
目标学校:桂林电子科技大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!