自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2022西部机场集团校园招聘计算机专业笔试

参加完西部机场的笔试,趁还有一点记忆,写一下笔试经验,给下届的童靴提供一下准备思路,希望可以有机会参与到接下来的面试!首先贴一下官方发布的考试内容:1.综合能力测试题型分布:言语理解、数量关系、逻辑推理和资料分析,共65道单选题,就是公务员行测那一套,但是我之前没有复习过公务员行测,只完成了一半的题目,要是有意向西部机场的建议提前看看行测!!2.专业知识测试题型分布:单选(40题)、多选(20题)、判断(20题)考题中涉及到的知识点比较散,我记忆中考到的有:C、java、Python的一些基础语

2021-11-20 19:38:27 3261 1

原创 PyCharm报错—Fatal Python error : unable to load the file system codec

报错窗口如下:找了很多方法,发现只有这个可以,帮大家避雷!第一步:第二步:选择你最新安装的可用的python.exe所在路径最后就可以看到可以正常运行啦!

2021-03-14 14:20:02 695

原创 历届试题—颠倒的价牌

#include <string> #include <iostream>#include <algorithm>using namespace std;int turn(int x){ if(x==6) return 9; if(x==9) return 6; return x;}int a[7]={0,1,2,5,6,8,9}; int main(){ for(int i=1;i<7;i++){ for(int j=0;

2020-10-09 22:58:04 174

原创 历届试题—排他平方数

#include <algorithm>using namespace std;typedef long long LL;int arry[30];int main(){ for(LL i=100000;i<1000000;i++){ bool flag1=true,flag2=true; LL a=i,b=i*i,k=0; while(a){ int tmp=a%10; for(int j=0;j<k;j++){ if(tmp==a

2020-10-09 21:25:51 120

原创 历届试题—振兴中华

#include <iostream>#include <algorithm>#include <stdio.h>using namespace std;int a[4][5]={{1,2,3,4,5},{2,3,4,5,6},{3,4,5,6,7},{4,5,6,7,8}},res=0;void dfs(int x,int y){ if(x==3 && y==4){ res++; } if(x>3 || y>4) retu

2020-10-08 15:59:17 209

原创 历届试题—幻方填空

#include <iostream>#include <algorithm>#include <stdio.h>using namespace std;int a[10]={2,3,4,5,6,7,8,10,12,14};int b[9];int main(){ do{ bool flag = true; int tmp = 16+a[0]+a[1]+13; b[0] = a[2]+a[3]+11+a[4]; b[1] = 9+a[5]+

2020-10-08 15:41:39 275

原创 历届试题—核桃的数量

常规解法#include <iostream>#include <algorithm>using namespace std;int main(){ int a,b,c;cin>>a>>b>>c; for(int i=1;i<100000;i++){ if(i%a==0 && i%b==0 && i%c==0){ cout<<i<<endl; retu

2020-10-08 10:47:59 109

原创 历届试题—连号区间数

#include <iostream>#include <algorithm>using namespace std;int a[50010];//最大值-最小值=区间长度-1即为连续区间 int main(){ int n,res=0;cin>>n; for(int i=0;i<n;i++) cin>>a[i]; for(int i=0;i<n;i++){ int minn = a[i]; int maxx =

2020-10-07 17:03:41 114

原创 历届试题—带分数

#include <iostream>#include <algorithm>using namespace std;int a[9]={1,2,3,4,5,6,7,8,9};int func(int l,int r){ int res=0; for(int i=l;i<=r;i++) res=res*10+a[i]; return res;}int main(){ int n,sum=0;cin>>n; do{ for(int i

2020-10-07 16:42:10 72

原创 历届试题—翻硬币

#include <iostream>#include <string.h>#include <algorithm>using namespace std;char c1[1010],c2[1010];void turn(int x){ if(c1[x]=='*') c1[x]='o'; else c1[x]='*'; return;}int main(){ cin>>c1>>c2; int sum=0,len = st

2020-10-07 14:45:17 85

原创 历届试题—错误票据

#include <iostream>#include <algorithm>using namespace std;int main(){ int n,num,i=0,a[10010];cin>>n; while(n--){ while(cin>>num) a[i++]=num; } sort(a,a+i); int res,ans; for(int j=0;j<i;j++){ if(a[j] == a[j+1] -

2020-10-07 13:58:59 111

原创 历届试题—蚂蚁感冒

#include <iostream>#include <cmath>#include <algorithm>using namespace std;int main(){ int n,a[1000];cin>>n; int left=0,right=0; for(int i=0;i<n;i++) cin>>a[i]; for(int i=1;i<n;i++){ if(abs(a[i]) < abs

2020-10-06 16:41:59 68

原创 历届试题—三部排序

#include <iostream>using namespace std;#include <iostream>using namespace std;void sort3p(int* x, int len){ int p = 0; int left = 0; int right = len-1; while(p<=right){ if(x[p]<0){ int t = x[left]; x[left] = x[p]; x

2020-10-06 15:57:14 152

原创 历届试题—李白打酒

#include <iostream>#include <algorithm>using namespace std;int a[15]={2,2,2,2,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};int ans=0;/*李白打酒*/ int main(){ do{ int sum = 2; for(int i=0;i<15;i++) if(a[i] == 2) sum *= 2; else sum -= 1

2020-10-06 09:40:00 196

原创 历届试题—马虎的算式

#include <iostream>using namespace std;int main(){ int sum=0; for(int a=1;a<10;a++) for(int b=1;b<10;b++) for(int c=1;c<10;c++) for(int d=1;d<10;d++) for(int e=1;e<10;e++){ if(a!=b && a!=c && a!=d &&

2020-10-06 09:38:37 99

原创 历届试题—马虎的算式

#include <iostream>using namespace std;int main(){ int sum=0; for(int a=1;a<10;a++) for(int b=1;b<10;b++) for(int c=1;c<10;c++) for(int d=1;d<10;d++) for(int e=1;e<10;e++){ if(a!=b && a!=c && a!=d &&

2020-10-02 16:57:58 87

原创 历届试题—高斯日记

#include <iostream>using namespace std;bool isleapyear(int y){ if((y%4==0 && y%100!=0)|| y%400==0) return true; return false;}int main(){ int y=1777,m=4,d=30; for(int i=1;i<8113;i++){ d++; if(m==12 && d==32){ y++

2020-10-02 16:42:09 96

原创 历届试题—螺旋折线

#include<iostream>#include <algorithm>using namespace std;typedef long long LL;int main(){ int x,y,t;cin>>x>>y; if(x>=0 && y>=0){ t=max(x,y); cout<<(LL)((2*t)*(2*t)+x-y)<<endl; }else if(x<0

2020-10-02 09:43:24 117

原创 历届试题—递增三元组

//执行会超时#include <iostream> #include <algorithm>using namespace std;#define N 100000int main(){ int n,a[N],b[N],c[N];cin>>n; for(int i=0;i<n;i++) cin>>a[i]; for(int i=0;i<n;i++) cin>>b[i]; for(int i=0;i<n;i++

2020-10-02 08:33:31 147

原创 历届试题—后缀表达式

#include <iostream> #include <algorithm>using namespace std;//求最优解方法:最大值减去最小值,加其他值的绝对值 int main(){ int n,m,a[10000]; long long res=0; cin>>n>>m; int k = n+m+1; for(int i=0;i<k;i++) cin>>a[i]; if(!m){ for(int

2020-09-30 15:48:10 186

原创 历届试题—等差数列

#include <iostream> #include <algorithm>using namespace std;int main(){ int n,sum=0,a[10000];cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); int cha = a[1]-a[0]; for(int i=a[0];i<=a[n-1];i+=cha){ sum++;

2020-09-30 14:08:18 147

原创 历届试题—完全二叉树的权值

#include <iostream> #include <stack>#include <cmath>using namespace std;int main(){ stack<int> s; int n,d,a[100000]; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; s.push(a[i]); } for(int i=1;i<n;i++){ i

2020-09-30 13:53:08 132

原创 历届试题—特别数的和

#include <iostream> using namespace std;bool func(int n){ while(n){ if(n%10==2 || n%10==0 ||n%10==1 ||n%10==9){ return true; } n/=10; } return false;}int main(){ int n,res=0;cin>>n; for(int i=1;i<=n;i++){ if(func(i)) res

2020-09-30 12:42:41 68

原创 历届试题—测试次数

#include <iostream> using namespace std;int dp[4][1010];void func(int x,int y){ for(int i=1;i<=x;i++){ for(int j=1;j<=y;j++){ dp[i][j] = j; } } for(int i=2;i<=x;i++){ for(int j=1;j<=y;j++){ for(int k=1;k<j;k++){

2020-09-30 12:22:26 98

原创 历届试题—迷宫

#include <iostream> #include <queue>#include <algorithm>using namespace std;int dir[4][2]={{1,0},{0,-1},{0,1},{-1,0}};char res[4]={'D','L','R','U'};char map[30][50];int vis[30][50]={0};int x1,y1,x2,y2;struct node{ int x; int

2020-09-29 20:05:31 109

原创 历届试题—数的分解

#include <iostream> #include <algorithm>using namespace std;bool judge(int x){ while(x){ if(x%10==2 || x%10==4) return false; x /=10; } return true;}int main(){ int res=0; for(int i=1;i<2019;i++){ if(!judge(i)) continue;

2020-09-29 17:31:51 80

原创 历届试题—乘积尾零

#include <iostream> #include <algorithm>using namespace std;int main(){ int x,num2=0,num5=0; for(int i=0;i<100;i++){ cin>>x; while(x%2==0){ num2++; x /= 2; } while(x%5==0){ num5++; x /= 5; } } cout&lt

2020-09-29 10:22:09 84

原创 历届试题—螺旋矩阵

#include <iostream>using namespace std;int a[1010][1010];//直接开始模拟 int main(){ int n,m,r,c; cin>>n>>m>>r>>c; int x=0,y=0,z=n-1,w=m-1,num=1; while(num<=n*m){ for(int i=x;i<=w;i++) a[x][i]=num++;//向右 x++;

2020-09-28 18:48:13 96

原创 历届试题—凯撒密码

#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ string str; cin>>str; for(int i=0;i<str.size();i++){ if(str[i]>='a' && str[i]<='w'){ str[i] += 3; }else if(str[i]=='x'){ str[i]

2020-09-28 16:49:06 619

原创 历届试题—合法括号序列

#include <iostream>#include <bits/stdc++.h>using namespace std;int res=0;void dfs(int l,int r,string op){ if(l==4 && r==4){ res++; cout<<op<<endl; return; } if(l<4)dfs(l+1,r,op+'('); if(r<l)dfs(l,r+1,op

2020-09-28 16:34:24 273

原创 历届试题—矩阵

第十一届七月省赛#include <iostream>#include <string>using namespace std;int a[1011][1011];int main(){ a[0][0] = 1; for(int i=0;i<=1010;i++){ for(int j=0;j<=1010;j++){ if(i-1>=j){ a[i][j] += a[i-1][j]%2020; } if(j){

2020-09-28 14:24:58 146

原创 历届试题—走方格

#include <iostream>using namespace std;int n,m,sum=0;void dfs(int x,int y){ if(x>n || y>m) return; if(x%2==0 && y%2==0) return; if(x==n && y==m) sum++; dfs(x+1,y); dfs(x,y+1);}int main(){ cin>&gt

2020-09-27 23:03:13 100

原创 历届试题—解码

#include <iostream>using namespace std;int main(){ string str; cin>>str; string ans=""; for(int i=0;i<str.size();i++){ if(str[i]>='0' && str[i]<='9'){ for(int j=0;j<(str[i]-'0')-1;j++)

2020-09-27 22:48:13 98

原创 历届试题—合并检测

#include <iostream>using namespace std;int main(){ int n=100,res,sum; int minn=999999; for(int k=1;k<=100;k++){ if(n%k==0){ sum = n/k +(0.01*100*k); }else{ sum = n/k +(0.01*100*k)+1;

2020-09-27 22:02:07 109

原创 日常练习—日期问题

#include <iostream>#include <stdio.h>#include<algorithm>using namespace std;struct Node{ int year,month,day;}ans[5];int ant=0;int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};int isleap(int y){ if((y%4==0 && y%100!

2020-09-25 21:12:56 161

原创 日常练习—方格分割

#include <iostream>using namespace std;int vis[7][7] = {0};int sum = 0;int dir[4][2] = {0,1,0,-1,1,0,-1,0};oid dfs(int x,int y){ if(x==0 || y==0 || x==6 || y==6){ sum++;return; } for(int i=0;i<4;i++){ int x1 = x + dir[i][0]; int y

2020-09-25 14:59:14 102

原创 日常练习—承压计算

#include <iostream>#include <cmath>#include <algorithm>#include <stdio.h>using namespace std;double a[30][30] ={{7},{5,8},{7,8,8},{9,2,7,2},{8,1,4,9,1},\{8,1,8,8,4,1},{7,9,6,1,4,5,4},{5,6,5,5,6,9,5,6},{5,5,4,7,9,3,5,5,1},\{7

2020-09-24 20:58:38 111

原创 日常练习——等差素数列

#include <iostream>using namespace std;bool isprime(int n){ if(n<2) return false; else if(n==2) return true; for(int i=2;i*i<n;i++){ if(n%i==0) return false; } return true;}int main(){ for(int d=2;d<10000;d++){ for(int

2020-09-24 15:11:35 52

原创 日常练习—最长公共子序列

#include <iostream>#include <string>#include <algorithm>using namespace std;const int N=1010;int c[N+1][N+1];int longest_com_sub(string x,string y){ int m=x.size(); int n=y.size(); int maxv=0; x = ' ' + x; y = ' ' + y; fo

2020-09-22 09:20:59 55

原创 日常练习—递归实现回文

#include <iostream>#include <string.h>using namespace std;bool func(string s,int left,int right){ if(left>right || left==right){ return true; }else if(s[left] == s[right]){ return func(s,left+1,right-1); }else return false;}in

2020-09-21 21:15:41 207

空空如也

空空如也

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

TA关注的人

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