自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 BUPT OJ|311. 图像识别-计算机二2014

题目来源 北邮OJ#include<bits/stdc++.h>using namespace std;/*Input:23 3 01 1 10 1 00 1 03 4 110 11 12 139 8 7 62 3 4 5*/int T,N,M,D;int data[105][105];bool mark[105][105]; int route[8][2]={1,1,1,0,1,-1,0,-1,-1,-1,-1,0,-1,1,0,1};// 选择C++1

2021-03-09 11:05:56 71

原创 BUPT OJ|305. 网络的核-计算机一2014

题目来源 北邮OJ使用FLoyd算法即可【注意事项】使用memset()函数初始化二维数组时要千万小心:1.二维整型数组利用memset()函数初始化时,只能初始化为0或者-1,否则二维整型数组的值将为随机数。2.二维char数组利用memset()函数初始化时不受限制,可初始化为任意字符。#include<bits/stdc++.h>using namespace std;/*Input:23 31 21 32 34 21 22 3*/int mai

2021-03-03 17:14:53 76 1

原创 BUPT OJ |130. 二叉排序树

题目来源 北邮OJ#include<iostream>#include<cstring>#include<math.h>#include<limits.h>using namespace std;/*Input:52 5 1 3 4*/int main(){ int n,x,k,tmp; cin>>n; int a[10005]; memset(a,-1,sizeof(a)); for(int i=1;i<n

2021-02-19 19:55:09 73

原创 BUPT OJ|128. 二进制数

题目来源 北邮OJ#include<iostream>#include<algorithm>#include<stdlib.h>#include<math.h>using namespace std;/*Input:523535262456275989835*/int main(){ int i,x,T; int a[1000]; cin>>T; while(T--){ cin>>x;

2021-02-17 18:53:39 67

原创 BUPT OJ |126. 中序遍历序列

题目来源 北邮OJ#include<iostream>#include<cstring>#include<math.h>#include<limits.h>using namespace std;/*Input:241 2 3 441 3 2 4*/int main(){ int T,flag,temp; int a[405],N; cin>>T; while(T--){ cin>>N; f

2021-02-17 18:39:16 106

原创 BUPT OJ|125. 统计节点个数

题目来源 北邮OJ#include<iostream>#include<cstring>#include<math.h> using namespace std;/*Input:250 11 22 33 430 20 1*/int a[1005][1005],N;int du[1005];bool isPNode(int x){ for(int i=0;i<N;i++){ if(a[i][x]!=0&&du

2021-02-17 16:34:37 53

原创 BUPT OJ|127.最小距离查询

题目来源 北邮OJ法一:最后的输出一定要用printf,cout会运行超时#include<iostream>#include<algorithm>#include<cstring>#include<limits.h>#include<math.h>#include<vector>using namespace std;int main(){ std::ios::sync_with_stdio(false);

2021-02-04 18:50:55 134 1

原创 牛客网|C翻转(北邮往年复试题)

C翻转题目来源 牛客网-北邮往年复试题输入1 2 3 4 56 7 8 9 1011 12 13 14 1516 17 18 19 2021 22 23 24 251 3 1 1输出11 6 1 4 512 7 2 9 1013 8 3 14 1516 17 18 19 2021 22 23 24 25#include<iostream>#include<algorithm>using namespace std;void pswap(

2021-02-03 18:23:56 107

原创 牛客网| 树查找(北邮往年复试题)

树查找题目来源 牛客网-北邮往年考题输入41 2 3 42输出2 3#include<iostream>#include<algorithm>using namespace std;int main(){ int n,d,k=1,flag=1; cin>>n; int a[n+1]; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>d; for(int

2021-02-03 18:18:13 136

原创 牛客网 |复数集合( 北邮往年复试题)

复数集合题目来源 牛客网北邮往年考题输入3PopInsert1+i2Pop输出emptySIZE = 11+i2SIZE = 0#include<iostream>#include<algorithm>#include<stdlib.h>#include<math.h>#include <vector>using namespace std;class complexNum{ public:

2021-02-03 18:11:54 179

原创 BUPT OJ|303. 众数-计算机一2014

#include<iostream>#include<vector>#include<algorithm>using namespace std;#define MAXN 100001/*输入:241 1 1 251 1 2 2 3 */int main(){ int T,n,zh; cin>>T; while(T--){ cin>>n; int num[MAXN]={0}; int a[n]; f.

2021-02-03 17:59:01 73

原创 BUPT OJ|304. 旋转图像-计算机一2014

每次循环顺时针旋转矩阵90°#include<iostream>#include<cstring>using namespace std;/*Input:22 3111000903 3111101111180 ------------270°测试-----------12 3111000270*/ char a[100][100];char b[100][100];int N,M;void rotate(int rad){ int.

2021-02-03 17:54:05 84

原创 BUPT OJ|123. 字符串转换

注意“感叹号”处,需要取Abs和26-Abs的最小值!!!#include<iostream>#include<algorithm>#include<cstring>#include<limits.h>#include<math.h>using namespace std;/*Input:2abbbaabbac*/int main(){ int T,min,temp; string str; int a[26];.

2021-02-03 17:47:56 69

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除