主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
讨论区
兑换中心
登录
注册
上岸
RingoCrystal
我是菜逼
关注
发消息
文章
0
题解
166
发帖
0
笔记
49
Ta的粉丝
68
关注数
0
粉丝数
68
获赞数
813
阅读数
48079
二进制数字翻转 题解:他这个翻转啊,就是字符串的reverse,不是01翻
#include <bits/stdc++.h> using namespace std; string intToBinary(int x){ string s; while(x!=0){ s.push_back(x%2+'0')...
P1487
2025年2月7日 10:39
回复 1
|
赞 8
|
浏览 351
求三角形面积 题解:亲测答案一致,不知道为什么过不去验证
#include <bits/stdc++.h> using namespace std; struct triEdge{ int x1,y1; int x2,y2; double length; triEdge():x1(0),...
P5111
2025年2月5日 14:41
回复 1
|
赞 4
|
浏览 369
切木棍 题解:纯粹的数学问题
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n){ if(n%2!=0||n<=4){ ...
P1674
2025年3月18日 11:49
回复 2
|
赞 3
|
浏览 193
ISBN号码识别 题解:规则简单,注意ISBN-10,当结果为10时为X
#include <bits/stdc++.h> using namespace std; int main() { string s; while(cin>>s){ string t=s; for(int i=0;i<...
P2000
2025年3月19日 14:27
回复 0
|
赞 1
|
浏览 46
改名卡 题解:这一题真的需要题解吗?
n/10,如果你需要的话,这个是取商
P1514
2025年3月19日 11:13
回复 0
|
赞 0
|
浏览 76
n的阶乘 - 华南师范 题解:20!,使用long long
#include <bits/stdc++.h> using namespace std; long long fuc(long long n){ if(n==0||n==1)return 1; return n*fuc(n-1); } in...
P1890
2025年3月19日 10:48
回复 0
|
赞 1
|
浏览 93
又一版 A+B 题解:注意有0,且题目有误,不是231-1,是2^31-1,需要long long
#include <bits/stdc++.h> using namespace std; int main() { int m; while(cin>>m){ if(m==0)break; long long a...
P1328
2025年3月18日 15:50
回复 0
|
赞 1
|
浏览 63
乘法 题解:注意重复,map标记即可
#include <bits/stdc++.h> using namespace std; int main() { int n,m,k; while(cin>>n>>m>>k){ int n1=n,m1=m; ...
P1909
2025年3月9日 11:04
回复 2
|
赞 6
|
浏览 194
字符解密 题解:简简单单find函数
#include <bits/stdc++.h> using namespace std; int main() { string a="abcdefghijklmnopqrstuvwxyz"; string b=a; reverse(b....
P1824
2025年3月18日 12:16
回复 0
|
赞 0
|
浏览 48
欧拉回路 题解:连通且度数均为偶数
#include <bits/stdc++.h> using namespace std; const int MAXN = 1000; // 最大节点数 // 并查集数据结构,用于判断图是否连通 struct UnionFind { int pare...
P1309
2025年3月18日 12:12
回复 0
|
赞 3
|
浏览 136
调整方阵 - 武汉大学 题解:分析规则,循环即可
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { vector<vector<int...
P1705
2025年3月18日 10:46
回复 0
|
赞 7
|
浏览 143
字符串对齐 题解:find和for auto的特殊使用
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n){ vector<string>a(n); for(in...
P2006
2025年3月16日 16:06
回复 0
|
赞 2
|
浏览 108
01字符串 题解:数学推理,公式同feibo
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int dp[n+1]; dp[0]=1;...
P1479
2025年1月31日 11:46
回复 2
|
赞 23
|
浏览 460
字符串排序2 题解:stablesort,大小写同时排序
#include <bits/stdc++.h> using namespace std; bool compare(char c,char b){ if(c>='A'&&c<='Z')c=c-'A'+'a'; if(b&...
P1255
2025年1月27日 15:45
回复 1
|
赞 35
|
浏览 618
输出素数 题解:格式化输出,注意最后的换行逻辑
#include <bits/stdc++.h> using namespace std; int main() { int a[1000000]={0}; a[0]=a[1]=1; for(int i=2;i*i<=1000000;i++){ ...
P2003
2025年3月16日 10:30
回复 0
|
赞 0
|
浏览 76
排序去重 题解:一个map,两个任务
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n){ map<int,int>mp; ...
P1898
2025年3月15日 12:05
回复 0
|
赞 0
|
浏览 108
重写输入 题解:无语显示bug,显示内容和真实内容不一致,代码正解为第二段
#include <bits/stdc++.h> using namespace std; int tag(char c){ int ans=0; if(c>='0'&&c<='9')ans=1; else if...
P1799
2025年3月15日 12:03
回复 0
|
赞 1
|
浏览 107
跳一跳 题解:0:break,1:+1 ct=0,2:+2+ct*2
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n){ int ct=0,ans=0; vect...
P1729
2025年3月15日 11:16
回复 0
|
赞 0
|
浏览 97
质数的个数 题解:素数筛
#include <bits/stdc++.h> using namespace std; const int N = 1e7+5; int main() { int a[N]={0}; for(int i=2;i*i<=N;i++){ ...
P1833
2025年3月15日 11:00
回复 0
|
赞 0
|
浏览 86
继续畅通工程 题解:最简单的理解,你看不懂可以过来找我
#include <bits/stdc++.h> using namespace std; struct road{ int a,b,w,s; road(int a,int b,int w,int s):a(a),b(b),w(w),s(s){} ...
P1311
2025年3月14日 14:26
回复 0
|
赞 3
|
浏览 136
1
2
3
...
9
本科学校:中国药科大学
目标学校:河南大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!