自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (1)
  • 收藏
  • 关注

原创 C++标准模板库——string

直接上代码:#include<cstdio>#include<iostream> //cin cout 在 iostream头文件中 而不是stdio.h #include<string>using namespace std;int main(){ string str = "abcdefg"; for(int i=0;i<str....

2018-06-23 08:38:45 165

原创 C++标准模板库——set

直接上代码:#include<cstdio>#include<set>using namespace std;int main(){ set<int> si; //迭代器 只有vector和string支持 it+i的写法 si.insert(3); si.insert(5); si.insert(2); si.insert(4); si....

2018-06-21 07:01:17 261

原创 C++标准模板库——vector

直接上代码#include<cstdio>#include<vector>using namespace std;int main(){ vector<int> student; //变长数组 vector<vector<int> > teacher; //在typename也是一个vector时的情况下,> &gt...

2018-06-20 06:52:53 191

原创 PAT (Advanced Level) Practice 1027 Colors in Mars (20)

People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 dig...

2018-06-19 06:44:40 124

原创 PAT (Advanced Level) Practice 1019 General Palindromic Number (20)

A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers...

2018-06-14 21:39:36 144

原创 PAT (Basic Level) Practice 1036 跟奥巴马一起编程(15)

美国总统奥巴马不仅呼吁所有人都学习编程,甚至以身作则编写代码,成为美国历史上首位编写计算机代码的总统。2014年底,为庆祝“计算机科学教育周”正式启动,奥巴马编写了很简单的计算机代码:在屏幕上画一个正方形。现在你也跟他一起画吧!输入格式:输入在一行中给出正方形边长N(3<=N<=20)和组成正方形边的某种字符C,间隔一个空格。输出格式:输出由给定字符C画出的正方形。但是注意到行间距比列...

2018-06-12 07:23:09 167

原创 PAT (Advanced Level) Practice 1031 Hello World for U (20)

Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as:h de ll rlowoThat is, the characters must be pri...

2018-06-12 06:57:00 155

原创 PAT (Advanced Level) Practice 1036 Boys vs Girls (25)

This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:Each input file contains one test ...

2018-06-11 12:56:09 145

原创 PAT (Advanced Level) Practice 1006 Sign In and Sign Out (25)

At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you...

2018-06-10 11:02:08 186

原创 冒泡排序、二分查找

//冒泡排序 #include<cstdio>int main(){ int M; int num[100]; scanf("%d",&M); for(int i=0;i<M;i++){ scanf("%d",&num[i]); } int temp; for(int i=0;i<(M-1);i++){ //两两比较...

2018-06-09 21:41:46 224

原创 PAT (Advanced Level) Practice 1011 World Cup Betting (20)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si...

2018-06-08 22:53:00 146

原创 PAT (Basic Level) Practice 1004 成绩排名 (20)

读入n名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。输入格式:每个测试输入包含1个测试用例,格式为\ 第1行:正整数n 第2行:第1个学生的姓名 学号 成绩 第3行:第2个学生的姓名 学号 成绩 ... ... ... 第n+1行:第n个学生的姓名 学号 成绩其中姓名和学号均为不超过10个字符的字符串,成绩为0到100之间的一个整数,这里保证在一组测试用...

2018-06-07 22:41:43 134

原创 PAT (Basic Level) Practice 1010 一元多项式求导 (25)

设计函数求一元多项式的导数。(注:x^n^(n为整数)的一阶导数为n*x^n-1^。)输入格式:以指数递降方式输入多项式非零项系数和指数(绝对值均为不超过1000的整数)。数字间以空格分隔。输出格式:以与输入相同的格式输出导数多项式非零项的系数和指数。数字间以空格分隔,但结尾不能有多余空格。注意“零多项式”的指数和系数都是0,但是表示为“0 0”。输入样例:3 4 -5 2 6 1 -2 0输出...

2018-06-06 22:33:26 257

原创 PAT (Advanced Level) 1065 A+B and C (20)

Given three integers A, B and C in [-2^63^, 2^63^], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (<=10). Th...

2018-06-05 22:54:01 180

转载 概率论与数理统计——全概率公式与贝叶斯公式

在概率论与数理统计中,有两个相当重要的公式——全概率公式与贝叶斯公式。然而很多人对这两个公式感到非常迷茫。一来不知道公式背后的意义所在,二来不知道这些冰冷的公式能有什么现实应用。1. 全概率公式在讲全概率公式之前,首先要理解什么是“完备事件群”。 我们将满足 BiBj=∅(i≠j)B1+B2+⋯=ΩBiBj=∅(i≠j)B1+B2+⋯=Ω这样的一组事件称为一个“完备事件群”。简而言之,就是事件之间...

2018-06-05 22:37:51 1518

原创 PAT (Basic Level) 1018 锤子剪刀布 (20)

大家应该都会玩“锤子剪刀布”的游戏:两人同时给出手势,胜负规则如图所示:现给出两人的交锋记录,请统计双方的胜、平、负次数,并且给出双方分别出什么手势的胜算最大。输入格式:输入第1行给出正整数N(<=10^5^),即双方交锋的次数。随后N行,每行给出一次交锋的信息,即甲、乙双方同时给出的的手势。C代表“锤子”、J代表“剪刀”、B代表“布”,第1个字母代表甲方,第2个代表乙方,中间有1个空格。输...

2018-06-01 23:29:58 174

856数据结构与组成原理专业课资料.rar

这里是考研期间(杭电)博主自己整理的一些电子资料,希望可以有助于后来者,加油!

2019-05-13

空空如也

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

TA关注的人

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