首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
苍灵
这个人很懒,什么都没有写...
关注
发消息
文章
0
题解
26
发帖
0
笔记
0
Ta的粉丝
0
关注数
1
粉丝数
0
获赞数
27
阅读数
3142
旋转矩阵 题解:C++ 本题有很多小注意点
#include<bits/stdc++.h> using namespace std; int n,m,k,a[150][150]={0},b[100]={0}; //需要注意使用引用传值 void change1(int &n,int &m,...
P1221
2025年6月26日 22:10
回复 1
|
赞 4
|
浏览 189
旋转方阵 题解:C++ 需要注意结果的输出格式
#include<bits/stdc++.h> using namespace std; int main(){ int n,index=1,a[30][30]={0}; cin>>n; int left=0,right=n-1,top=0,bo...
P1216
2025年6月26日 19:49
回复 0
|
赞 2
|
浏览 131
旋转矩阵 - 北航 题解:C++ 关键在于顺时针旋转90度的公式
#include<bits/stdc++.h> using namespace std; //矩阵旋转90度的函数;需要注意的是其余的180度和270度可通过多次调用这个函数来达到相同的效果;对于0度的话直接判断是否 //与原矩阵相同即可 void change(i...
P1377
2025年6月26日 15:33
回复 0
|
赞 1
|
浏览 88
杨辉三角形 - 西北工业大学 题解:C++ 解法不严谨,没有写递归函数
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int num[300][300]={0}; for(int i=2;i<...
P1392
2025年6月26日 13:33
回复 0
|
赞 0
|
浏览 117
杨辉三角形 题解:C++ 利用数组
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n&&n!=0){ int num[30][30]={0}; if(n=...
P1062
2025年6月26日 13:20
回复 0
|
赞 0
|
浏览 85
字符棱形 题解:C++ 找循环规律
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ for(int j=0;j<n-i;j...
P1473
2025年6月26日 13:19
回复 0
|
赞 0
|
浏览 96
进制转换3 题解:C++ 80%通过率的看这里
#include<bits/stdc++.h> using namespace std; int main(){ int m,n; string s; cin>>m>>n; cin>>s; if(m==n){ ...
P1422
2025年6月25日 21:48
回复 0
|
赞 2
|
浏览 114
二进制数 题解:C++
#include<bits/stdc++.h> using namespace std; int main(){ unsigned int n; while(cin>>n){ int num[100],index=0; while(n!=...
P1380
2025年6月25日 20:27
回复 0
|
赞 1
|
浏览 121
排列与二进制 题解:不需要大数,需思考
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m&&(n!=0&&m!=0)){ in...
P1368
2025年6月25日 20:18
回复 0
|
赞 2
|
浏览 96
进制转换2 题解:C++ 懒人写法
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>s){ int res=0,m; for(int i=s.length()-1;i...
P1259
2025年6月25日 19:11
回复 0
|
赞 1
|
浏览 115
进制转换 题解:C++ 可主要分为两步:1.大数对2取余;2.大数除以2
#include<bits/stdc++.h> using namespace std; bool isZero(int a[],int len){ for(int i=0;i<len;i++){ if(a[i]!=0){ return fals...
P1178
2025年6月25日 18:41
回复 0
|
赞 0
|
浏览 137
负二进制 题解:C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int m; string s; if(n==0){ cout&l...
P1097
2025年6月25日 16:03
回复 0
|
赞 6
|
浏览 139
数字 题解:C++ 利用数组巧解
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>s){ int num[10]={0}; for(int i=0;i<s.l...
P1668
2025年6月25日 15:00
回复 0
|
赞 0
|
浏览 120
容易的题 题解:C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(cin>>s){ int a=0,b=0,c=0,d=0; for(int i=0;i<...
P1667
2025年6月25日 14:49
回复 0
|
赞 0
|
浏览 83
平方和与立方和 题解:题中说了32位整数即可,所以可以使用int
#include<bits/stdc++.h> using namespace std; int main(){ int m,n; while(cin>>m>>n){ if(m>n){ swap(m,n); } ...
P1212
2025年6月23日 18:09
回复 0
|
赞 0
|
浏览 101
成绩的等级 题解:C++
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n>=90){ cout<<"A"<<endl; }el...
P1038
2025年6月23日 18:00
回复 0
|
赞 0
|
浏览 104
校门外的树 题解:C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,a[100][2],num[10001]={0}; cin>>n>>m; for(int i=0;i&l...
P1085
2025年6月23日 17:54
回复 0
|
赞 1
|
浏览 206
百鸡问题 题解:50%正确率的,看看写没写while(cin>>n)
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ for(int x=0;x<=n/5;x++){ for(int y=0...
P1348
2025年6月23日 17:26
回复 0
|
赞 1
|
浏览 125
平方和与倒数和 题解:C++
#include<bits/stdc++.h> using namespace std; //求和 int sumH(int n){ int sum=0; for(int i=1;i<=n;i++){ sum=sum+i;...
P1045
2025年6月23日 16:06
回复 0
|
赞 1
|
浏览 133
统计卡牌的值 题解:C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,sum=0; cin>>n; for(int i=0;i<n;i++){ string s; cin&...
P1735
2025年6月23日 15:19
回复 0
|
赞 0
|
浏览 110
1
2
本科学校:无
目标学校:无
点此申请N诺身份认证
获得 noobdream 认证,享受多重认证福利!