首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
RingoCrystal
我是菜逼
关注
发消息
文章
0
题解
166
发帖
0
笔记
49
Ta的粉丝
68
关注数
0
粉丝数
68
获赞数
827
阅读数
50423
猴子报数 题解:约瑟夫问题
#include <bits/stdc++.h> using namespace std; int main(){ int n,p,m; while(cin>>n>>p>>m){ if(n==...
P1081
2025年1月27日 13:30
回复 0
|
赞 12
|
浏览 337
字符串排序3 题解:getchar compare自定义
#include <bits/stdc++.h> using namespace std; bool compare(string a,string b){ return a.size()<b.size(); } int main(){ ...
P1261
2025年1月27日 13:15
回复 0
|
赞 9
|
浏览 398
旋转方阵 题解:方块收缩模拟输出
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ vector<vector<int>>...
P1216
2025年1月27日 13:07
回复 0
|
赞 17
|
浏览 549
最大序列和 题解:dp思路
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ vector<long long>a(n) ; ...
P1172
2025年1月27日 12:46
回复 0
|
赞 36
|
浏览 545
击鼓传花 题解:vector手撕约瑟夫
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ vector<int>a(n); ...
P1018
2025年1月27日 11:38
回复 1
|
赞 14
|
浏览 476
旋转矩阵 - 北航 题解:旋转后判断
#include <bits/stdc++.h> using namespace std; vector<vector<int>> reverseMatrix(vector<vector<int>>a){ int...
P1377
2025年1月27日 11:28
回复 0
|
赞 34
|
浏览 559
大整数加法 题解:struct内部写法
#include <bits/stdc++.h> using namespace std; const int LEN=1001; struct BigInteger{ int data[LEN]; int length; void in...
P1474
2025年1月26日 16:07
回复 1
|
赞 3
|
浏览 340
回文数的判断 题解:reverseInt方法
#include <bits/stdc++.h> using namespace std; int reverseInt(int x){ int ans=0; while(x!=0){ ans*=10; ans+=...
P3501
2025年1月26日 15:15
回复 0
|
赞 3
|
浏览 279
约瑟夫问题的实现 题解:Vector向量解法
这里根据本题,提供两个约瑟夫问题的题解,我们依靠动态链接库里面的向量辅助处理,方便的处理中间的的元素的删除,当然,如果你的学校不支持这个,我建议你采用循环链表,标记0位置即可达到同样的目的 此段代码为题解,n为数量,m为步数 #include <bits/stdc++...
P5104
2025年1月26日 15:05
回复 0
|
赞 3
|
浏览 323
车厢的重组 题解:
#include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { int a[n]; for(int i=0; i<n; i++)ci...
P5132
2025年1月23日 19:23
回复 0
|
赞 4
|
浏览 348
上升序列 题解:
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int a[n],b[n]; for(int i=0;i<n;i++){...
P2017
2025年1月23日 19:11
回复 0
|
赞 4
|
浏览 309
分数求和 题解:规律就是a是a+b,b是上一次的a,注意要用double或者float
#include <bits/stdc++.h> using namespace std; double sumAns(int N) { double sum = 0; double a = 2, b = 1; // 初始的前两项 for ...
P1047
2024年4月6日 16:29
回复 0
|
赞 7
|
浏览 845
判断是否是整数 题解:3.000算整数
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>s){ int flag=0; int tag=0; for(int i=...
P1031
2024年4月6日 13:15
回复 0
|
赞 2
|
浏览 843
平方和与倒数和 题解:如何获得float,很简单1.0/i
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; float ansa=0; for(int i=1;...
P1045
2024年4月6日 11:33
回复 0
|
赞 2
|
浏览 789
阶乘和 题解:考虑到数据的容量,使用longlong改写n!即可
#include <stdio.h> long long getF(long long a){ if(a==0||a==1)return 1; return a*getF(a-1); } int main(){ int n; scanf("%d",...
P1044
2024年4月6日 11:21
回复 0
|
赞 4
|
浏览 743
打印日期 题解:遍历题,注意break,不break在输入2000 31的时候会错误
这种题的本质就是单纯的顺序检索题,这个代码还可以优化,就是不用day,直接在else情况下break,此时输出为year,month,n,注意输出的格式 #include <bits/stdc++.h> using namespace std; int...
P1410
2024年4月6日 09:54
回复 0
|
赞 2
|
浏览 649
删除最大最小数 题解:复制数组得到最大最小,核心是解决只删除一个的问题
#include <bits/stdc++.h> using namespace std; int main(){ int n,x; cin>>n; vector<int> a; vector<int> copy; ...
P1022
2024年4月5日 09:07
回复 0
|
赞 0
|
浏览 791
统计单词 题解:测试用例只有一个坑,别的很基本
#include <bits/stdc++.h> using namespace std; int main(){ string s; vector<string> sheet; while(cin>>s){ sheet.pus...
P1394
2024年4月5日 08:42
回复 0
|
赞 8
|
浏览 945
最长连续因子 题解:利用数组存储因子,然后检查,更新出来结果
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int sheet[11000]={0}; int size=0; for(int i=2;...
P1020
2024年4月4日 13:44
回复 0
|
赞 10
|
浏览 958
字母频率 题解:想问一下有没有大佬知道,为什么加了while就只能过66%
#include <bits/stdc++.h> using namespace std; int main(){ string s; while(getline(cin,s)){ for(int i=0;i<s.size();i++){ i...
P1019
2024年4月3日 15:12
回复 2
|
赞 1
|
浏览 735
1
...
6
7
8
9
本科学校:中国药科大学
目标学校:河南大学
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!