自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 第九届蓝桥杯大赛个人赛省赛(软件类)真题(待补)

1.第几天2000年的1月1日,是那一年的第1天。那么,2000年的5月4日,是那一年的第几天?注意:需要提交的是一个整数,不要填写任何多余内容。2.明码汉字的字形存在于字库中,即便在今天,16点阵的字库也仍然使用广泛。16点阵的字库把每个汉字看成是16x16个像素信息。并把这些信息记录在字节中。一个字节可以存储8位信息,用32个字节就可以存一个汉字的字形了。把每个字节转为2进制表示,1表示墨迹,0表示底色。每行2个字节,一共16行,布局是: 第1字节,第2字节 ...

2020-10-16 19:27:35 489

原创 第十一届蓝桥杯大赛校内模拟(软件类)真题

1【问题描述】在计算机存储中,15.125GB是多少MB?【答案提交】这是一道结果填空的题,你只需要算出结果后提交即可。本题的结果为一个整数,在提交答案时只填写这个整数,填写多余的内容将无法得分。2【问题描述】1200000有多少个约数(只计算正约数)。【答案提交】这是一道结果填空的题,你只需要算出结果后提交即可。本题的结果为一个整数,在提交答案时只填写这个整数,填写多余的内容将无法得分。#include <stdio.h>int main() { i..

2020-10-16 12:21:54 1092

原创 简单语法分析器

参考了两篇博客,有时间补上。# 语法分析器from string import punctuation # 形参lst为嵌套列表,内容为每一条产生式.# 返回值rst为一个字典,记录所有FIRST集合的数据def get_first(lst): rst = {} flag = 1 punc = punctuation # 引入标点符号库 for i in lst: rst["".join(i[:i.index('→')])] = [] # 将每

2020-05-31 23:32:21 475

原创 C语言简单词法分析器

/*词法分析器(C语言)输入源程序、输出单词符号1、预处理程序2、扫描器(单词识别程序)*/#include <stdio.h>#include <stdlib.h>#include <string.h>#define KEYWORD_NUM 32int pos; // pos搜索指针char ch; // ch最新读入的字符char...

2020-04-29 16:21:58 677 1

原创 VMware:The VMware Authorization Service is not running

Vmware在启动虚拟机的时候,有时候会出现下面的错误这是因为VMware Authorization Service服务没有开启。这时我们需要去开启VMware Authorization Service服务。首先,右击桌面的我的电脑图标,点击管理。在左边的栏中找到服务。在服务里找到VMware Authorization Service,右击启动。...

2019-09-09 17:42:30 336

原创 HDU - 6645 Stay Real

分析:由于小顶堆的性质,key值最大的结点一定在叶子结点(可以直接拿取 ),所以直接排个序,两个人贪心每次取最大的就可以了。#include<cstdio>#include<algorithm>using namespace std;const int maxn = 1e6 + 5;int h[maxn];int main() { int T;...

2019-08-09 11:02:53 264

原创 HDU - 6629 string matching

#include<stdio.h>#include<string.h>const int maxn = 1e6 + 5;int nt[maxn];char s[maxn];// ekmpvoid getNext(char* s, int* next) { int i = 0, j, po, len = strlen(s); next[0] = len;...

2019-08-07 09:43:45 188

原创 快速序列操作I

给出一个n个元素的数组,设计一个数据结构,支持以下两种操作。Add(L,R,v):把的值全部增加v。 Query(L,R):计算子序列的元素和、最小值和最大值。#include<cstdio>#include<algorithm>using namespace std;const int maxn = 10005;const int inf = 0x3f...

2019-08-05 11:53:31 161

原创 动态范围最小值问题

给出一个有n个元素的数组,设计一个数据结构,支持以下两种操作。Update(x,v):把修改为v。 Query(L,R):计算// 线段树 #include<cstdio>#include<algorithm>using namespace std;const int maxn = 10005;const int inf = 0x3f3f3f3f;i...

2019-08-05 10:11:18 297

原创 范围最小值问题(RMQ)

给出一个n个元素的数组,设计一个数据结构,支持查询操作Query(L,R):计算。// Tarjan的Sparse-Table算法#include<cstdio>#include<algorithm>using namespace std;const int maxn = 10005;int a[maxn], d[maxn][20]; // d[i][j]...

2019-08-05 09:13:39 231

原创 动态连续和查询问题

给定一个n个元素的数组,设计一个数据结构支持以下两种操作。Add(x,d)操作:让增加d。 Query(L,R):计算。// 二叉索引树#include<stdio.h>const int maxn = 10005;int c[maxn];int n;int lowbit(int x) { return x & (-x);}void add(in...

2019-08-05 08:48:39 126

原创 连续和查询问题

给定一个n个元素的数组,,...,,设计一个数据结构,支持一个查询操作Query(L,R):计算。如果每次利用循环来计算,单次查询需要的时间,效率太低。如果借助前缀和的思想,可以花时间事先计算好(定义),因为,每次查询都只需要时间。#include<stdio.h>const int maxn = 10005;int s[maxn];int main() { ...

2019-08-05 08:36:07 128

原创 7-14 嘴强王者 (30 分)

#include<stdio.h>#define maxn 100005#define maxm 5005int main(){ int n, m, a[maxn], x, l, r, index; scanf("%d%d", &n, &m); for (int i = 1; i <= n; i++) { scanf("%d", &a...

2019-08-02 10:42:23 557 1

原创 HDU - 6614 AND Minimum Spanning Tree

#include<stdio.h>#include<math.h>const int maxn = 200005;int e[maxn];int main() { int T; scanf("%d", &T); int n, m; while (T--) { scanf("%d", &n); m = 0; int sum =...

2019-08-01 20:03:49 210

原创 POJ - 2352 Stars

分析:每个星星的level是它左下区域(包括边界)的星星的个数,由于星星的坐标是先按y的大小,再按x的大小排序的,所以第i个星星之前的星星都不在它的上侧,计算第i个星星的level时只需要统计之前有多少个星星的x坐标小于等于第i个星星的x坐标(即不在它的上侧)。如果用a[j]来记录下前i-1个星星中x坐标为j的个数,那个第i个星星的level就会等于a[0]+a[1]+...+a[x]。每次计算完...

2019-08-01 19:29:35 406

原创 使用Eclipse开发Java程序

1、创建Java工程使用Eclipse创建Java程序前,首先需要创建一个工程包含所有的文件。(1)选择File -> New -> Java Project来显示New Java Project向导。(2)在Project name域中输入demo,Location域自动设置为默认。也可以为你的工程自定义位置。(3)确保选择了选项Use project folde...

2019-07-17 14:56:43 600

原创 Requests库的安装

1、以管理员身份运行cmd。可以用【win + Q】快速打开搜索输入cmd,右击以管理员身份运行。2、输入命令pip install requests安装Requests库。3、测试,启动IDLE,导入requests库4、访问http://www.baidu.com,输出状态码,200表示访问成功。5、更改编码为utf-8编码,打印网页内容,网页被成功抓取下来。...

2019-07-16 14:31:09 659 2

原创 Linux下不能使用fflush(stdin)

标准规定fflush()函数是用来刷新输出(stdout)缓存的。对于输入(stdin),它是没有定义的。GCC编译器没有定义它的实现,所以不能使用fflush(stdin)来刷新输入缓存。如果需要清空stdin,我们可以通过读取剩余的字符来实现:char ch;while((ch = getchar()) != '\n' && ch != EOF);...

2019-07-16 10:52:49 464

原创 检测合法性输入时,输入非int型数据,进入死循环

#include<stdio.h>int main(){ int num = 0, cnt = 0; char ch; printf("请输入序号:\n"); SCA:scanf("%d", &num); switch(num) { case 1: printf("case 1\n"); break; case 2: printf("case 2\n...

2019-07-16 10:37:26 428

原创 在命令窗口创建、编译和运行java程序

1、首先使用文本编辑器(比如记事本、写字板)来创建Java源代码文件(以Welcome.java为例)。2、打开命令行窗口,切换到Java源代码文件所在目录(我放在F:\java下)3、使用javac命令对Welcome.java源程序进行编译,编译器会生成Welcome.class文件4、使用java命令来执行这个文件...

2019-07-16 08:03:46 709

原创 UVA - 11809 Floating-Point Numbers

#include<stdio.h>#include<string.h>#include<math.h>const double eps = 1e-4;int main() { double M[20][40]; long long E[20][40]; // 打表 for (int i = 0; i <= 9; ++i) { f...

2019-07-14 11:19:51 111

原创 UVA - 202 Repeating Decimals

#include<stdio.h>#include<string.h>#define maxn 3005int main(){ int a, b; int ys[maxn], xs[maxn]; while (scanf("%d%d", &a, &b) == 2) { memset(ys, -1, sizeof(ys)); mems...

2019-07-13 16:37:16 120

原创 UVA - 1588 Kickdown

#include<stdio.h>#include<string.h>#define maxn 105int match(char s1[], char s2[]){ int len1 = strlen(s1); int len2 = strlen(s2); int k = -1; for (int i = 0; i < len1; ++i) {...

2019-07-13 12:07:45 131

原创 UVA - 158 Box

#include<stdio.h>int main(){ int w, h, t; int rect[6][2]; while (scanf("%d%d", &w, &h) == 2) { if (w < h) { t = w; w = h; h = t; } rect[0][0] = w; rect[0][1] = h; ...

2019-07-12 20:54:22 139

原创 UVA - 10340 All in All

#include<stdio.h>#include<string.h>#define maxn 100005int main(){ char s[maxn], t[maxn]; while (scanf("%s%s", s, t) == 2) { int len1 = strlen(s); int len2 = strlen(t); int i ...

2019-07-12 20:18:00 116

原创 UVA - 1368 DNA Consensus String

#include<stdio.h>int main(){ int T, m, n; char s[55][1005], t[] = "ACGT"; scanf("%d", &T); while (T--) { scanf("%d%d", &m, &n); for (int i = 0; i < m; ++i) { scanf(...

2019-07-12 19:59:53 175

原创 UVA - 232 Crossword Answers

#include<stdio.h>#include<string.h>int main(){ int r, c, kase = 0, first = 1; int a[15][15]; char s[15][15]; while (scanf("%d", &r) == 1 && r) { int cnt = 0; memse...

2019-07-12 17:40:54 99

原创 UVA - 455 Periodic Strings

#include<stdio.h>#include<string.h>#define maxn 100int main(){ int T, first = 1; char s[maxn]; scanf("%d", &T); while (T--) { scanf("%s", s); int len = strlen(s); int f...

2019-07-11 15:33:27 110

原创 UVA - 1225 Digit Counting

#include<stdio.h>#include<string.h>int main(){ int T, n; int a[10]; scanf("%d", &T); while (T--) { memset(a, 0, sizeof(a)); scanf("%d", &n); for (int i = 1; i <= ...

2019-07-11 15:32:05 96

原创 UVA - 1586 Molar mass

#include<stdio.h>#include<string.h>#include<ctype.h>#define maxn 100int main(){ int T, a[4]; char s[maxn]; scanf("%d", &T); while (T--) { memset(a, 0, sizeof(a)); ...

2019-07-11 15:29:58 139

原创 UVA - 1585 Score

#include<stdio.h>#include<string.h>#define maxn 100int main(){ int T; char s[maxn]; scanf("%d", &T); while (T--) { scanf("%s", s); int len = strlen(s); int ans = 0, w =...

2019-07-11 15:28:30 114

原创 UVA - 227 Puzzle

#include<stdio.h>int main(){ int x, y, kase = 0, first = 1; char s[10][10], c; while (1) { c = getchar(); if (c == 'Z') break; int j = 0; do { if (c == ' ') { x = 0; ...

2019-07-11 15:26:11 119

原创 UVA - 1339 Ancient Cipher

#include<stdio.h>#include<string.h>#include<stdlib.h>#define maxn 105int cmp(const void *a, const void *b){ return *(int *)a - *(int *)b;}int main(){ int cnt1[30], cnt2[...

2019-07-10 16:27:11 98

原创 紫书 习题2-6 排列(permutation)

用1,2,3,...,9组成三位数abc,def,和ghi,每个数字恰好使用一次,要求abc:def:ghi=1:2:3。按照“abc def ghi”的格式输出所有解,每行一个解。#include<stdio.h>int main(){ int a[3]; for (int i = 123; i <= 321; ++i) { int b[10] = {0};...

2019-07-09 09:56:31 269

原创 紫书 习题2-5 分数化小数(decimal)

输入正整数a,b,c,输出a/b的小数形式,精确到小数点后c位。,。输入包含多组数据,结束标记为a=b=c=0。样例输入:1 6 40 0 0样例输出:Case 1: 0.1667#include<stdio.h>int main(){ int a, b, c, kase = 0; while (scanf("%d%d%d", &a, &a...

2019-07-09 09:49:22 232

原创 OpenJ_Bailian - 1088 滑雪

Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长的滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11...

2019-06-12 17:23:04 133

原创 HDU - 2199 Can you solve this equation?

Problem DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your lucky.InputThe first line of the input contains an...

2019-06-12 17:17:14 169

原创 HDU - 1242 Rescue

Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.An...

2019-06-12 17:11:19 182

原创 HDU - 1445 Ride to School

Problem DescriptionMany graduate students of Peking University are living in Wanliu Campus, which is 4.5 kilometers from the main campus - Yanyuan. Students in Wanliu have to either take a bus or ri...

2019-06-12 17:03:54 238

原创 HDU - 1028 Ignatius and the Princess III

"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The second problem is, given an positive integer N, we define an equation like this:...

2019-06-11 20:50:12 146

trec06c.tgz

数据集压缩包里有“data” 文件夹,“full” 文件夹和 “delay” 文件夹。“data” 文件夹里面包含多个二级文件夹,二级文件夹里面才是垃圾邮件文本,一个文本代表一份邮件。“full” 文件夹里有一个 index 文件,该文件记录的是各邮件文本的标签。

2020-05-31

空空如也

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

TA关注的人

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