自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

原创 MySQL基础知识一:数据表的创建、维护、删除

文章目录1.创建数据表1.1 数据类型1)字符类型2)时间和日期类型3)数值数据类型4)enum数据类型1.2 创建数据表sql命令2.维护数据表2.1 增加、修改和删除字段2.2 增加、修改和删除约束3.删除数据表3.1 仅删除数据3.2 删除结构和数据 1.创建数据表 1.1 数据类型 ...

2020-01-10 18:02:44 121 0

原创 2019年3月2号 第一次考PAT甲级总结

总分94,其实是运气比较好。还好这次第一题不是很坑,之前9月份和12月份第一题暴力求解其实都不是很会。 记录一下自己的心路历程。 13:32:30 第一次提交第一题 15分 好像是有两个测试点错误,然后没管直接做下一题 13:43:55 第一次提交第二题 20分 此时已经35分,发现时间...

2019-03-23 18:46:18 1204 1

原创 甲级PAT 2019年3月 Structure of a Binary Tree (30 分)

7-4Structure of a Binary Tree(30分) Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traver...

2019-03-23 18:45:20 280 0

原创 甲级PAT 2019年3月 Anniversary (25 分)

7-2Anniversary(25分) Zhejiang University is about to celebrate her 122th anniversary in 2019. To prepare for the celebration, the alumni association ...

2019-03-23 18:43:41 239 0

原创 甲级PAT 2019年3月 Sexy Primes (20 分)

7-1Sexy Primes(20分) Sexy primes are pairs of primes of the form (p,p+6), so-named since "sex" is the Latin word for "six". (Quot...

2019-03-23 18:42:04 409 0

原创 甲级PAT 1084 Broken Keyboard (20 分)(vector)

1084Broken Keyboard(20 分) On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to thos...

2019-03-23 18:11:45 30 0

原创 甲级PAT 1060 Are They Equal (25 分)(科学表示法)

1060Are They Equal(25 分) If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are bo...

2019-03-23 18:11:39 43 0

原创 甲级PAT 1073 Scientific Notation (20 分)(科学计数法)

1073Scientific Notation(20 分) Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation ma...

2019-03-23 18:11:31 27 0

原创 甲级PAT 1068 Find More Coins (30 分)(动态规划)

1068Find More Coins(30 分) Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a unive...

2019-03-23 18:11:16 51 0

原创 蓝桥杯2016第7届C++B组省赛 四平方和

题目 四平方和定理,又称为拉格朗日定理: 每个正整数都可以表示为至多4个正整数的平方和。 如果把0包括进去,就正好可以表示为4个数的平方和。 比如: 5 = 0^2 + 0^2 + 1^2 + 2^2 7 = 1^2 + 1^2 + 1^2 + 2^2 (^符号表示乘方的意思) 对于一个给定...

2019-03-23 17:59:34 65 0

原创 甲级PAT 1074 Reversing Linked List (25 分)(链表)

1074Reversing Linked List(25 分) Given a constantKand a singly linked listL, you are supposed to reverse the links of everyKelements onL. For example...

2019-03-01 23:08:52 47 0

原创 甲级PAT 1052 Linked List Sorting (25 分)(链表)

1052Linked List Sorting(25 分) A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each st...

2019-03-01 23:08:01 33 0

原创 甲级PAT 1032 Sharing (25 分)(链表)

1032Sharing(25 分) To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the wo...

2019-03-01 23:07:02 41 0

原创 甲级PAT 1092 To Buy or Not to Buy (20 分)(散列)

1092To Buy or Not to Buy(20 分) Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. Ther...

2019-03-01 23:06:00 46 0

原创 甲级PAT 1071 Speech Patterns (25 分)(map)

1071Speech Patterns(25 分) People often have a preference among synonyms of the same word. For example, some may prefer "the police", while...

2019-03-01 23:04:48 37 0

原创 甲级PAT 1063 Set Similarity (25 分)(集合,set)

1063Set Similarity(25 分) Given two sets of integers, the similarity of the sets is defined to beN​c​​/N​t​​×100%, whereN​c​​is the number of distinc...

2019-03-01 23:03:28 33 0

原创 甲级PAT 1056 Mice and Rice (25 分)(模拟比赛)

1056Mice and Rice(25 分) Mice and Riceis the name of a programming contest in which each programmer must write a piece of code to control the movemen...

2019-03-01 23:01:58 51 0

原创 甲级PAT 1138 Postorder Traversal (25 分)(先序中序转后序)

1138Postorder Traversal(25 分) Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal se...

2019-03-01 22:54:59 58 0

原创 甲级PAT 1140 Look-and-say Sequence (20 分)(逻辑题)

1140Look-and-say Sequence(20 分) Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... whe...

2019-03-01 22:52:51 86 0

原创 甲级PAT 1142 Maximal Clique (25 分)(bfs)

1142Maximal Clique(25 分) Acliqueis a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. Ama...

2019-03-01 22:51:30 60 0

原创 甲级PAT 1052 Linked List Sorting (25 分)(链表)

1052Linked List Sorting(25 分) A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each st...

2019-02-28 16:25:00 34 0

原创 甲级PAT 1032 Sharing (25 分)(链表)

1032Sharing(25 分) To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the wo...

2019-02-28 16:01:57 63 0

原创 甲级PAT 1144 The Missing Number (20 分)

1144 The Missing Number (20 分) Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specif...

2019-02-27 17:19:03 30 0

原创 甲级PAT 1152 Google Recruitment (20 分)(暴力求解)

1152 Google Recruitment (20 分) In July 2004, Google posted on a giant billboard along Highway 101 in Silicon Valley (shown in the picture below) for...

2019-02-27 17:03:17 58 0

原创 Dev c++下 [Error] ‘stoi’ was not declared in this scope

使用了万能头文件#include<bits/stdc++.h> 工具-》编译器选项-》代码生成/优化-》代码生成-》将语言标准调成GUN C++11 就可以成功使用stoi函数了

2019-02-27 17:00:07 2127 1

原创 甲级PAT 1145 Hashing - Average Search Time (25 分)(hash,二次方探测)

1145 Hashing - Average Search Time (25 分) The task of this problem is simple: insert a sequence of distinct positive integers into a hash table firs...

2019-02-27 16:31:41 119 0

原创 甲级PAT 1148 Werewolf - Simple Version (20 分)(暴力求解)

1148 Werewolf - Simple Version (20 分) Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human be...

2019-02-27 16:16:49 43 0

原创 甲级PAT 1149 Dangerous Goods Packaging (25 分)(map,vector)

1149 Dangerous Goods Packaging (25 分) When shipping goods with containers, we have to be careful not to pack some incompatible goods into the same c...

2019-02-27 16:06:52 41 0

原创 甲级PAT 1147 Heaps (30 分)(堆排序)

1147 Heaps (30 分) In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of ...

2019-02-27 15:58:54 84 0

原创 甲级 PAT1146 Topological Order (25 分)(拓扑排序)

1146 Topological Order (25 分) This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtai...

2019-02-27 15:49:42 84 0

原创 甲级PAT 1123 Is It a Complete AVL Tree (30 分)(AVL,CBT)

1123 Is It a Complete AVL Tree (30 分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of a...

2019-02-27 15:45:16 39 0

原创 甲级PAT 1066 Root of AVL Tree (25 分)(AVL)

1066 Root of AVL Tree (25 分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node d...

2019-02-24 14:56:27 33 0

原创 甲级PAT 1155 Heap Paths (30 分)(dfs,堆排序)

1155 Heap Paths (30 分) In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent nod...

2019-02-24 11:31:03 57 0

原创 甲级PAT 1151 LCA in a Binary Tree (30 分)(LCA)

1151 LCA in a Binary Tree (30 分) The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descen...

2019-02-24 10:40:46 53 0

原创 甲级PAT 1051 Pop Sequence (25 分)(stack)

1051 Pop Sequence (25 分) Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are su...

2019-02-23 22:41:23 27 0

原创 甲级PAT 1143 Lowest Common Ancestor (30 分)(LCA)

1143 Lowest Common Ancestor (30 分) The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as desc...

2019-02-23 18:45:24 44 0

原创 甲级PAT 1115 Counting Nodes in a BST (30 分)(BST)

1115 Counting Nodes in a BST (30 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left...

2019-02-23 16:53:29 38 0

原创 甲级PAT 1099 Build A Binary Search Tree (30 分)(BST)

1099 Build A Binary Search Tree (30 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The l...

2019-02-23 15:29:40 56 0

原创 甲级PAT 1064 Complete Binary Search Tree (30 分)(完全二叉查找树,BST,CBT)

1064 Complete Binary Search Tree (30 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The ...

2019-02-23 11:26:39 318 0

原创 甲级PAT 1098 Insertion or Heap Sort (25 分)(插入排序和堆排序)

1098 Insertion or Heap Sort (25 分) According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sort...

2019-02-22 23:01:03 84 0

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