自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

PAT实战 小白进阶

开始慢慢的刷题路 9月我来了 cw我来了

  • 博客(37)
  • 资源 (2)
  • 收藏
  • 关注

原创 关于我,希望大家能够了解

因为一个人,爱上一首歌,甚至是一种生活。hotel california 就是那首能把我听哭的歌。今年大三,遇见了一个改变了我大学生活的女孩,她优秀迷人,我们的差距很大。 而她今年暑假就要从西电转去加州大学河滨校区了。今天是7.4号,离她离开的日子越来越近。总觉得相逢恨晚,如果能够重来,我的大学不应该是这样的生活。不过好在我还有些许时间,还有些许机会去追寻...

2018-06-26 20:17:05 276 1

转载 linux bash shell中,单引号、 双引号,反引号(``)的区别及各种括号的区别

一、单引号和双引号首先,单引号和双引号,都是为了解决中间有空格的问题。因为空格在linux中时作为一个很典型的分隔符,比如string1=this is astring,这样执行就会报错。为了避免这个问题,因此就产生了单引号和双引号。他们的区别在于,单引号将剥夺其中的所有字符的特殊含义,而双引号中的'$'(参数替换)和'`'(命令替换)是例外。所以,两者基本上没有什么区别,除非在内容中遇到...

2019-08-27 10:12:13 218

原创 PAT 1034 Head of a Gang

#include<iostream>#include<string>#include<map>using namespace std;int n, k;bool vis[3000] = { false };int G[3000][3000] = { 0 }, weigth[3000] = { 0 };int person = 0;map<...

2018-09-03 17:12:20 131

原创 a1086 Tree Traversals Again

#include<cstdio>#include<stack>#include<cstring>#include<algorithm>using namespace std;struct node{ int data; node* lchild; node* rchild;};int pre[35], in[35], n, ...

2018-08-23 00:50:49 144

原创 BFS 迷宫步数

#include<cstdio>#include<string>#include<queue>using namespace std;int n, m;char acw[100][100];bool inq[100][100] = { false };int X[4] = { 0, 0, 1, -1 };int Y[4] = { 1, -1, ...

2018-08-19 17:15:50 250

原创 a1091 1091 Acute Stroke (30)

下午有一个模拟的acm考试 ,参加一下摸摸自己的底。加油!我还是很爱你的,唱晚。就算有一百个诱惑放在我面前,我还是喜欢你。 #include<cstdio>#include<queue>using namespace std;int m,n,l,t;int acw[1290][130][61];bool inq[1290][130][61] = { ...

2018-08-19 11:15:32 154

原创 a1052 Linked List Sorting

现在是2018年8月16日20:25:09,洛杉矶时间为8.16日5:25,唱晚还没起床吧,我好想你。 静态链表,只用struct结构就可以实现目的; #include<cstdio>#include<algorithm>using namespace std;struct acw { int address,key,next; bool flag;...

2018-08-16 20:25:39 82

原创 PAT1022 Digital Library

#define _CRT_SECURE_NO_WARNINGS#include<iostream>#include<set>#include<cstdio>#include<map>#include<string>using namespace std;map<string, set<int>>mp

2018-08-14 11:51:42 178

原创 PAT 1060 Are They Equal

本题运用的string中的.length(),.begin(),.erase()等方法; 本题思想是把数字串存为字符,对字符进行预处理和处理,依据字符形式进行相应的处理,例如0.0123、00123.456等数字。Sample Input 1:3 12300 12358.9Sample Output 1:YES 0.123*10^5Sample Input 2:3 ...

2018-08-13 21:55:43 251

原创 PAT 1063 Set Similarity

本节a1063 的知识点有如下:set容器的构造和元素的插入  set<int> acw[51];    acw[i].insert(e); set容器的内容比较for (set<int>::iterator it = acw[a].begin(); it != acw[a].end(); it++)    {        if (acw[b].f...

2018-08-12 10:36:55 88

原创 PAT 1047 Student List for Course

#define _CRT_SECURE_NO_WARNINGS //这一段是为了VS 2013 对scanf不报错做的声明;#include<algorithm>#include<cstdio>#include<vector>#include<cstring>using namespace std; char name[40010]...

2018-08-12 07:59:31 84

原创 PAT 1039 Course List for Student 翻译 分析 代码

 第一次用vector写程序,的确比数组好用多了,慢慢熟悉,相信可以习惯。#include<cstdio>#include<cstring>#include<vector>#include<algorithm>using namespace std;const int N = 40010;const int M = 26 * 26 ...

2018-08-09 23:47:39 203

原创 PAT 1032 Sharing 翻译 分析 代码

实在抱歉这两天更新比较晚,而且缺更,因为复习考研要调整作息和日程规划,这对原本是学渣的我难度较大,花了几天的时间调整,慢慢进入了状态。九月八号就要pat考试了,代码书才看了一半,很慢,不过还是尽量相信自己,考试地点是在西交,上机环境我查了一下,之后VC6.0,VS2008,2013这三种,所以花时间把原来的devc++换成了vs2013,慢慢熟悉和适应这个过程。还有最重要的一点,唱晚,我爱...

2018-08-08 00:02:38 165

原创 PAT 1028 List Sorting 翻译 分析 代码

#include<cstdio>#include<algorithm>#include<cstring>using namespace std;struct student{ int id; char name[10]; int sorce;}stu[100010];bool cmp1(student a,student b){ ret...

2018-07-31 23:08:06 129

原创 PAT 1077 Kuchiguse 翻译 分析 代码

#include<stdio.h>#include<string.h>int main(){ int i,j,n; scanf("%d",&n); getchar();//吸收换行符; char a[100][256];//构建100列(共有N句话),256行(每句话里面有多少字符) int minlen=256 ; for(i=0;i<n...

2018-07-30 23:11:15 272

原创 PAT 1062 Talent and Virtue 翻译 分析 代码

#include<cstdio>#include<algorithm>#include<cstring>using namespace std;struct student{ char id[10]; int vir,tal,level; int sum; }stu[100010];//这里一定要注意,按照题干的要求,否则出现段错误。很难找...

2018-07-30 22:10:44 153

原创 PAT 1069 The Black Hole of Numbers 翻译 分析 代码

#include<cstdio>#include<cmath>#include<algorithm>using namespace std;bool xcmp(int a,int b){ return a>b;}void to_array(int a,int b[]){ //数字转化数组 for(int i=3;i>=0;i-...

2018-07-30 01:12:44 124

原创 PAT 1093 Count PAT's 翻译 分析 代码

#include<stdio.h>#include<string.h>int main(){ char a[100010]; int i,len,lp[100010]={0},rt=0; gets(a); len = strlen(a); if(a[0]=='P') { lp[0]=1; } for(i=1;i<len;i++) { l...

2018-07-29 23:27:07 140

原创 中国大学MOOC-陈越、何钦铭-数据结构-起步能力自测题 1-5自测合集

自测-1 打印沙漏 #include<cstdio>#include<cmath>int main(){ int n,x,i,j,k; char c; scanf("%d %c",&x,&c); n=sqrt(2.0*(x+1))-1; if(n%2==0) n--; int acw=x-(n+1)*(n+1)/2+1; /...

2018-07-28 15:15:05 781

原创 PAT 1023 Have Fun with Numbers 翻译 分析 代码

#include<stdio.h>#include<string.h>int hash1[10]={0};int hash2[10]={0};int jud(char a[],int len){ if(a[0]>='5'&&a[0]<='9') { return 0; //false代表不合格的进位大整数; } if(...

2018-07-28 15:09:57 359

原创 PAT 1019 General Palindromic Number 翻译 分析 代码

#include<cstdio>bool jud (int a[],int num){ int i; for(i=0;i<num/2;i++) { if(a[i]!=a[num-1-i]) { return false; } } return true;}//此题运用了判断回文数方法和整数转化为D进制方法; int main(){ int ...

2018-07-27 22:52:30 138

原创 PAT 1035 password 翻译 分析 代码

#include<string.h>#include<stdio.h>struct p{ char id[15],password[15]; bool judge;}team[1005];void jud(p &a,int &count){ for(int i=0;i<strlen(a.password);i++){ if(a.p...

2018-07-26 12:15:55 135

原创 PAT 1005 Spell It Right 翻译 分析 代码

我宣布,c++天下第一,真的是好简单,寥寥数语就把程序描绘的淋漓尽致。Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each i...

2018-07-26 00:33:22 140

原创 PAT 1031 Hello World for U 翻译 分析 代码

#include<stdio.h>#include<string.h>int main(){ int i,j,n1,n2,n3; char b[40][40]; char a[100]; gets(a); int len=strlen(a); n1=(len+2)/3; n3=n1;n2=len+2-2*n1; //初始化数组 for (...

2018-07-25 00:23:05 121

原创 PAT 1036 Boys and girls 翻译 分析 代码

#include<cstdio>struct acw{ char id[15]; char name[15]; int sorce;}F,M,temp;void init(){ F.sorce=-1,M.sorce=101;}int main(){ int N,i; char sex; init(); scanf("%d",&N); for...

2018-07-23 00:55:28 359

原创 PAT 1006 sign in and sign out 翻译 分析 代码

#include<cstdio>struct acw{ char id[16] ; int hh,mm,ss;}first,last,temp;bool cmp (acw a,acw b){ if(a.hh!=b.hh ) return a.hh >b.hh ; if(a.mm!=b.mm ) return a.mm >b.mm ; else retu...

2018-07-23 00:00:07 223

原创 codeup hashtable_a

#include<cstdio>const int max =210;int hashtable[max]={0};int main(){ int n,m,a[max],i; scanf("%d %d",&n,&m); for(i=1;i<=n;i++){ scanf("%d",&a[i]); if(a[i]>=1&...

2018-07-22 00:09:06 183 2

原创 PAT 1025 Pat betting 翻译 分析 代码

#include<cstdio>#include<cstring>#include<algorithm>using namespace std;struct student{ char id[15] ; //考生学号 int sorce; //考生分数 int local_number; //考场号 int local...

2018-07-21 00:42:33 115

原创 linux 自学日记—— DNS劫持

攻击者     kali     ip:192.168.5.128受迫者      win7     ip:192.168.5.129首先配置ettercapleafpad /etc/ettercap/etter.dns*    A    192.168.5.128*.com    A    192.168.5.128*.cn    A    192.168.5.128*.or...

2018-07-20 20:11:16 2467

原创 linux kali 自学日记

初步入门 linux kali之arp嗅探攻击者     kali     ip:192.168.5.128受迫者      win7     ip:192.168.5.129使用工具ettercap  利用ettercap的中间人攻击,达到嗅探目的。linux kali中操作命令 ettercap -Gsniff eth0选项,打开host list 搜索host ,添加网关...

2018-07-20 17:28:04 887

原创 PAT 1011 world cup betting 翻译 分析 代码

#include<cstdio>int main(){ int i,j,wtf[5]; char tit[3]={'W','T','L'}; double ans=1.0,b,temp; for(i=0;i<3;i++) { temp=-1; for(j=1;j<4;j++){ scanf("%lf",&b); if(b>te...

2018-07-19 14:39:36 163

原创 PAT 1009 a*b for polynomials 翻译 分析 代码

题目: 1009 Product of Polynomials (25)(25 分)【多项式的a*b形式】This time, you are supposed to find A*B where A and B are two polynomials.【这次,你需要去计算两个多项式A*B的产生式】Input Specification:Each input file contains one t...

2018-07-04 19:32:15 236

原创 PAT 1002 a+b for polynomials 翻译 分析 代码

题目:1002 a+b for polynomials (25)(25 分)【多项式的a+b形式】This time, you are supposed to find A+B where A and B are two polynomials.【计算两个多项式A+B的和】InputEach input file contains one test case. Each case occupies...

2018-07-03 11:12:15 328

原创 PAT 1065 a+b>c 64bit 翻译 分析 代码

题目:1065 a+b>c 64bit (20)(20 分)【加值溢出】Given three integers A, B and C in [-2^63^, 2^63^], you are supposed to tell whether A+B > C.【给出三个整数A,B,C,三者均有限制,[-2^63^, 2^63],判断A+B是否大于C】Input Specification...

2018-07-02 17:33:58 198

原创 PAT 1046 Shortest Distance 翻译 分析 代码

题目:1046 Shortest Distance (20)(20 分)【最短路径】The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.【案例...

2018-07-01 13:50:26 640

原创 PAT 1042 shuffling machine 翻译 分析 代码

题目:1042 shuffling machine (20)(20 分)【洗牌程序】A given order is a permutation of distinct integers in [1, 54]. If the number at the i-th position is j, it means to move the card from position i to position...

2018-06-30 10:23:30 367

原创 PAT 1001 a+b 翻译 分析 代码

题目:1001 A+B Format (20)(20 分)【具有格式的a+b】Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four di...

2018-06-28 01:26:16 225

Ajax 学籍管理

利用microsoft vs写的一个关于Ajax学籍管理系统的程序

2018-06-26

ATM 网络计算

利用micosoft vs 写的一个网络计算程序,初步实现了ATM的转账,存款,取款,打印等功能

2018-06-26

空空如也

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

TA关注的人

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