weixin_43140251的博客

私信 关注
骑着蜗牛超丿F1
码龄3年
  • 9,225
    被访问量
  • 25
    原创文章
  • 257,449
    作者排名
  • 6
    粉丝数量
  • 于 2018-09-05 加入CSDN
获得成就
  • 获得5次点赞
  • 内容获得15次评论
  • 获得47次收藏
荣誉勋章
兴趣领域
  • #后端
    #Python#C/C++#MySQL
TA的专栏
  • PAT刷题记录
    15篇
  • ccf
    3篇
  • 移动软件开发实验
    1篇
  • 数据结构
    4篇
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

PAT甲级1015 Reversible Primes (20 分)

原题:A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime.Now given any two positive integers NNN (<10
原创
16阅读
0评论
0点赞
发布博客于 2 月前

PAT甲级1014 Waiting in Line (30 分)

原题:Suppose a bank has NNN windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space inside the yellow line in front of each window is
原创
24阅读
0评论
0点赞
发布博客于 2 月前

PAT甲级1013 Battle Over Cities (25 分)

原题:It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other highways to keep the rest of th
原创
11阅读
0评论
0点赞
发布博客于 2 月前

PAT甲级1010 Radix (25分)

原题:源代码:#include<iostream>#include<string>#include<cmath>using namespace std;string n1, n2;int tag, radix;int resradix = -1;long to10(string s, int r){ long res = 0; for(int i = s.length() - 1; i >= 0; i --){ in
原创
8阅读
0评论
0点赞
发布博客于 2 月前

PAT甲级1012 The Best Rank (25分)

原题目:To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean time, we encourage students by em
原创
10阅读
0评论
0点赞
发布博客于 2 月前

PAT甲级1011 World Cup Betting (20分)

原题:源代码:#include<iostream>#include<stdio.h>using namespace std;int main(){ double game[3][3]; char c[3] = {'W', 'T', 'L'}; double profit = 1; int tagj[3]; for(int i = 0; i < 3; i ++){ double max = -1;
原创
6阅读
0评论
0点赞
发布博客于 2 月前

PAT甲级1009 Product of Polynomials (25分)

原题目:源代码:#include<iostream>#include<vector>#include<stdio.h>#include<cmath>using namespace std;struct Ploy{ int n; float a;};float res[1000005];vector<Ploy> x, y;int main(){ int k1, k2; cin>>k1;
原创
17阅读
2评论
0点赞
发布博客于 3 月前

PAT甲级1008 Elevator (20分)

原题:源代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; int timelist[n]; for(int i = 0; i < n; i ++) cin>>timelist[i]; int sum = 0; int now = 0; for(int i = 0; i < n; i ++){
原创
5阅读
0评论
0点赞
发布博客于 3 月前

PAT甲级1007 Maximum Subsequence Sum (25分)

原题:思路:dp核心代码:if(num[i] > num[i] + dp[i - 1]) dp[i] = num[i]; else dp[i] = num[i] + dp[i - 1]; if(dp[i] > max){ ma = i; max = dp[i]; }源代码:#include<iostream>using namespace std;int main(){ int N; cin>>N; int n = N;
原创
10阅读
0评论
0点赞
发布博客于 3 月前

PAT甲级1006 Sign In and Sign Out (25分)

原题目:源代码:#include<iostream>#include<stdio.h>#include<string>#include<algorithm>using namespace std;struct Time{ int hours; int minutes; int seconds;};struct Person{ string id; Time comein; Time comeou
原创
7阅读
0评论
0点赞
发布博客于 3 月前

PAT甲级1004 Counting Leaves (30分)

原题:题目大意:一个树,n个节点,m个非叶节点,求出每一层叶节点数。源代码:#include<iostream>#include<queue>using namespace std;int tree[105][105]; //规模不大,直接用数组存树int tchild[105]; //每个节点的孩子数int vis[105]; //访问标志int n, m; //n结点数,m非叶结点数queue<int> q;
原创
16阅读
3评论
0点赞
发布博客于 3 月前

PAT甲级1005 Spell It Right (20分)

原题:源代码:#include<iostream>#include<vector>#include<string>using namespace std;string invert[10] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};int main(){ string n; vector<int> num;
原创
11阅读
0评论
0点赞
发布博客于 3 月前

PAT甲级1003 Emergency (25分)

原题:源代码:在这里插入代码片已AC:易失分点:
原创
9阅读
0评论
0点赞
发布博客于 3 月前

PAT甲级1002 A+B for Polynomials (25分)

(第一时间的思路,未优化)原题目:源代码:#include<iostream>#include<vector>#include<stdio.h>using namespace std;struct P{ int n; double a;};int main(){ vector<P> x, y, sum; int k; cin >> k; while(k --){ P
原创
27阅读
1评论
0点赞
发布博客于 3 月前

PAT甲级1001 A+B Format (20分)

源代码:#include<iostream> #include<cmath> using namespace std; int main(){ int x, y, sum; cin>>x>>y; sum = x+y; bool pt = true; if(sum < 0){ pt = false; sum = -sum; } bool flag = false; if(sum >= 1000) flag = true; if(!flag){ if
原创
16阅读
0评论
0点赞
发布博客于 3 月前

PTA2019级新生寒假集训营第一场7-3:A-B

本题要求你计算A−B。不过麻烦的是,A和B都是字符串 —— 即从字符串A中把字符串B所包含的字符全删掉,剩下的字符组成的就是字符串A−B。输入格式:输入在2行中先后给出字符串A和B。两字符串的长度都不超过10​4​​ ,并且保证每个字符串都是由可见的ASCII码和空白字符组成,最后以换行符结束。输出格式:在一行中打印出A−B的结果字符串。输入样例:I love GPLT! It’...
原创
124阅读
0评论
0点赞
发布博客于 1 年前

PTA2019级新生寒假集训营第一场7-1:N个数求和

7-1 N个数求和本题的要求很简单,就是求N个数字的和。麻烦的是,这些数字是以有理数分子/分母的形式给出的,你输出的和也必须是有理数的形式。输入格式:输入第一行给出一个正整数N(≤100)。随后一行按格式a1/b1 a2/b2 …给出N个有理数。题目保证所有分子和分母都在长整型范围内。另外,负数的符号一定出现在分子前面。输出格式:输出上述数字和的最简形式 —— 即将结果写成整数部分 分数...
原创
583阅读
0评论
1点赞
发布博客于 1 年前

csp突击图论题目

//BFS 求第一个点到最后一个点的最短路#include<bits/stdc++.h>using namespace std;const int N=1e5+10,M=2*N;int n,m,h[N],e[M],ne[M],idx,d[N]; //n个点m条边void add(int a,int b){ //a和b之间加边 e[idx]=b,n...
原创
38阅读
0评论
0点赞
发布博客于 2 年前

csp突击前两题常用算法代码

冒泡和选择排序就不放了,挺简单的快排和归并排序都是排序的优化算法快速排序快排平均时间复杂的是O(nlogn)空间复杂度最好是O(nlogn),最差退化为冒泡排序O(n)void quick_sort(int q[], int l, int r){ if(l > r) return; int i = l, j = r, x = q[(int)((l + r) / 2)]; //i...
原创
46阅读
0评论
0点赞
发布博客于 2 年前

简单易懂的并查集

本文是引用了一个大佬的博客!看了这篇博客,并查集变得也太可爱了!附上链接添加链接描述话说江湖上散落着各式各样的大侠,有上千个之多。他们没有什么正当职业,整天背着剑在外面走来走去,碰到和自己不是一路人的,就免不了要打一架。但大侠们有一个优点就是讲义气,绝对不打自己的朋友。而且他们信奉“朋友的朋友就是我的朋友”,只要是能通过朋友关系串联起来的,不管拐了多少个弯,都认为是自己人。这样一来,江湖上就形...
转载
93阅读
0评论
0点赞
发布博客于 2 年前

Mysql使用ibd和frm恢复表

声明:真是一个繁琐的过程!在mysql命令下选择以存在的数据名(如yhj)use yhj创建一个数据库表(需要和你想恢复的表同名,如user)create table user(id int);然后退回到命令行界面关闭mysql服务net stop mysql用已有的frm文件覆盖掉mysql文件里data目录下yhj里的frm文件接着对配置文件(mysql根目录下)my.i...
原创
111阅读
0评论
0点赞
发布博客于 2 年前

mysql服务器启动时出现错误2,系统无法找到指定文件解决方法

重装服务器进入bin目录下mysqld --removemysqld --installnet start mysql
原创
126阅读
0评论
0点赞
发布博客于 2 年前

windows上安装mysql

Windows 上安装 MySQLWindows 上安装 MySQL 相对来说会较为简单,最新版本可以在 MySQL 下载 中下载中查看(更详细安装:Windows 上安装 MySQL)。点击 Download 按钮进入下载页面,点击下图中的 No thanks, just start my download. 就可立即下载:下载完后,我们将 zip 包解压到相应的目录,这里我将解压后...
转载
57阅读
0评论
0点赞
发布博客于 2 年前

MySql 8+关于忘记初始密码

1.关闭sql服务 :net stop mysql出现错误,打开任务管理器手动关闭(如果还没有创建数据库 就不需要这部操作)2.打开mysql文件夹,删除我们执行 mysqld --initialize --console 生成的data文件3.以管理员身份重新执行 :mysqld --initialize --console即可重新看到初始密码原文链接:https://blog....
转载
130阅读
0评论
0点赞
发布博客于 2 年前

CCF认证 2019-9

小明种苹果续题目可去ccf认证管理系统查看,这里直接给出代码#include<iostream>#include<cmath>using namespace std;int main(){ int N,T,D = 0,E = 0; cin>>N; int b[N] = {0}; int **a = new int *[N]; for(int ...
原创
316阅读
0评论
0点赞
发布博客于 2 年前

DijKstra算法C++详解

先放代码 /*迪杰斯特拉算法*/ #include<iostream>#include<iomanip>using namespace std;#define INFINITY INT_MAX#define MAX_VERTEX_NUM 20#define TRUE 1#define FALSE 0#define OK 1typedef struc...
原创
703阅读
0评论
0点赞
发布博客于 2 年前

微信小程序自定义组件初学

首先选择的小程序代码中有一个pages页面下json中有usingComponents,然后里面加了一个不在Pages目录下的页面本着不懂就差的原则,看了小程序官网的解释component是用于自定义组件的构造器usingComponent多了一些需要注意的地方。总之这就是自定义组件的构造方法。然后在这个自定义的zhuanpan里查腾讯官方文档里知道这是创建audio的对象,就...
原创
135阅读
0评论
0点赞
发布博客于 2 年前

ctf

刚参加过一次信息安全类竞赛本人也是小白的身份参加的,两天时间边学边做,下面就介绍一下这次竞赛我的收获。首先,Crypto类题是ctf的入门题目,一般都比较简单易做,所以这次我也就之讲一下crypto类问题。一.下面先介绍一下常用的工具:这是CTF Wiki官网里给的工具下载网页,是比较全的了 :https://tools.pediy.com/ (分类很全)https:...
原创
6181阅读
9评论
4点赞
发布博客于 2 年前

Navicat试题答案

/*1. 查出至少有一个员工的部门。显示部门编号、部门名称、部门位置、部门人数。*/ /*2. 列出薪金比周星驰高的所有员工。*/ /*3. 列出所有员工的姓名及其直接上级的姓名。*/ /*4. 列出受雇日期早于直接上级的所有员工的编号、姓名、部门名称。*/ /*5. 列出部门名称和这些部门的员工信息,同时列出那些没有员工的部门。*/ /*6. 列出所有文员的姓名及其部门名称,部门的人数。*/ /*7. 列出最低薪金大于15000的各种工作及从事此工作的员工人数。*/ /*8. 列出在研发部工作的员工的姓名,假定不知道销售部的部门编号。*/ /*9. 列出薪金高于公司平均薪金的所有员工信息,所在部门名称,上级领导,工资等级。*/ /*10.列出与Tom从事相同工作的所有员工及部门名称。*/ /*11.列出薪金高于在部门30工作的所有员工的薪金的员工姓名和薪金、部门名称。*/ /*12.列出每个部门的员工数量、平均工资。*/ 题目答案
txt
发布资源于 3 年前