自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Steve·Curcy

一只菜鸡的挣扎史

  • 博客(151)
  • 收藏
  • 关注

原创 LSM内核模块 Demo 保姆级教程

LSM 内核模块实现 Demo前言 最近为了完成作业,被折磨的不轻。版本的不兼容,各种的报错经历了太多。在此记录,希望对大家有所帮助。 本人在写这篇文章的时候,重新安装虚拟机,从头开始的,所以,如果能坚持到最后,大概率会成功的。祝你们好运。(当然,如果这篇文章还没有过太久的话)准备工作 经过了大量测试,红帽公司的系统好像并不是很好编译 busybox,本人使用 Fedora 系统进行编译时,总是显示缺少依赖,而网上也找不到相应的库。转而使用教程较多的 Ubuntu 系统。为了本身系统的安全,当然使

2022-03-09 12:20:56 1728

原创 C/C++ 快读

有时候数据量比较大的时候,即使使用C语言提供的scanf函数也是会超时,这个时候就需要快读函数了。之所以可以使用快读,是因为getchar函数要比scanf函数快,所以自己编写的快读函数要更高效一点。还有就是,在快读函数中使用大量位操作代替加减乘除来减少时间的消耗,也是一个很好的选择,数据量越大,效率提升就越明显。这里在判断是否是数字的时候建议千万不要使用isdigit函数,并不知道这个函数到底里面是什么,但单从函数调用的耗时可能也很多,所以还是老老实实用条件判断。下面给出模板代码,不管是什么类型的快读都只

2020-10-05 17:07:03 4019

原创 C++ 实现贪吃蛇最基本模板

  这份代码只是一个最最基础的模型,并没有图形界面,实现了蛇的移动,基本地图的建设,食物生成等。剩下的功能都比较简单,也很繁琐,暂时不想再写下去了。贪吃蛇在大一的时候写过一次,但是当时刚学完C语言,写的代码都是放在一个main函数里面,现在有点时间了,准备再来用面向对象的思想进行一次编程。(这篇文章代码只适合小白,大牛请自动忽略)  贪吃蛇最主要的数据结构就是头插法实现链表。这样蛇身往前走的动作就变得格外简单。当然我使用了双向链表,纯粹是为了编写代码简单。这样蛇在向前移动时,通过方向计算下一个位置,判断是

2020-10-03 14:12:56 620

原创 黑客编程入门 之 后门编写初探

后门编写初探基本的执行DOS命令木马所需函数代码实现零管道木马和反弹木马零管道反弹木马木马功能的增强和扩展模块打造初步后门cmd shell 的自由切换模板 = 木马普通木马的自启动启动文件夹注册表启动其他基本的执行DOS命令木马  我们现在先考虑最早的木马:将目标主机作为服务器,打开一个端口进行监听,攻击者就可以通过telnet进行连接。  DOS功能是木马必须拥有的最小的功能模块。那么我们现在的任务就是:1. 开创 cmd.exe 进程;2. 把 cmd 进程和客户的输入连起来。那么接下来介绍一下

2020-09-05 11:52:04 1319

原创 黑客编程入门 之 网络编程入门

网络编程入门前言Socket技术详细介绍Socket 编程所需函数前言  “任何职业都可以成为黑客。你可以是一个木匠黑客。不一定是高科技。只要与技能有关,并且倾心专注于你正在做的事情,你就可能成为黑客。” ——引自《黑客伦理与信息时代精神》  在这里引入黑客定义就是想提醒自己和大家,真正的黑客精神:Open,Free,Share,热衷共享最新研究。时刻谨记黑客精神,不要现在盛行的"Script Kid"(专指只会使用现成软件进行攻击以取得满足感的,危害网络空间安全的人)。希望大家都能够为网络环境贡献自

2020-09-04 19:06:26 2676 2

原创 信息系统安全知识点总结

细节内容请参照LowBee信息系统安全客观题-选择客观题-填空主观题演讲内容名词解释零知识证明DSAHMQV客观题-选择安全管理评估工具通常不包括(D)A 问卷调查    B 检查列表C 访谈提纲    D 漏洞扫描以下那组全部都是多边安全模型(C)A BLP和BIBA    B BIBA和C-WC BN和BMA    D C-W和BN客观题-填空 计算机病毒的生命周期一般包括:潜伏、传播、触发和发作四个阶段 网络信息安全攻击的阶段包括:侦查、扫描、获取访问、维持访问和掩盖行踪 用

2020-06-21 21:14:01 4198

原创 第十届蓝桥杯C/C++ B组 E 迷宫

E题 迷宫[问题描述]:下图给出了一个迷宫的平面图,其中标记为 1 的为障碍,标记为 0 的为可 以通行的地方。010000000100001001110000  迷宫的入口为左上角,出口为右下角,在迷宫中,只能从一个位置走到这 个它的上、下、左、右四个方向之一。 对于上面的迷宫,从入口开始,可以按DRRURRDDDR 的顺序通过迷宫, 一共 10 步。其中 D、U、L、R 分别表示向...

2020-03-26 22:13:48 318

原创 二分(折半)笔记

文章目录二分(折半)查找统计一个大范围中具有某些特性的数据二分(折半)查找菜鸡今天又开始了一个新的算法,废话不多说,开始笔记。二分查找是一个十分常用的算法,适用于对带有单调性的数据进行处理或查找。大多数题目可能没那么显示,需要自己来找这个单调性在哪,所以这就是一个重点,具体的用法和代码很简单,就那么几行,但是对于折半的条件却需要有严格的要求。统计一个大范围中具有某些特性的数据[牛客]完全平...

2020-01-21 13:08:18 329

原创 KMP笔记

文章目录KMP算法1.前后缀最长公共长度2.统计字符串中某串出现的次数3.统计同一字符串中前后缀的公共部分KMP算法从头到尾彻底理解KMP对于KMP算法的学习推荐这一篇,这里面不仅讲了KMP而且比较详细以外,还扩充了一部分BM,Sunday算法的知识。对于KMP我个人的理解就是,求最长公共前缀。其中最重要的就是对next数组的理解,大多数题目也都是在对next的应用上做文章。本弱鸡也是在学...

2020-01-21 10:36:47 275

原创 区块链(Solidity && truffle调试)

这里写自定义目录标题来自垃圾的一篇笔记首先特别感谢两位大佬的博客有关于系统的声明有关软件及环境参考步骤安装truffle框架安装Ganache创建项目创建合约deploy配置以及编译部署调试(与合约互动)来自垃圾的一篇笔记总体来说还不错,至少今天终于整出来了,心里万分欣喜,对没有夸张真的是万分,truffle调试我找了好多博客都没有,终于最后还是找到了两篇,这是开搞第6天了,我太难了。下面我就...

2020-01-10 10:32:38 1007

原创 HDU - 5492 Find a path(dp)

Frog fell into a maze. This maze is a rectangle containing N rows and M columns. Each grid in this maze contains a number, which is called the magic value. Frog now stays at grid (1, 1), and he wants...

2019-09-10 09:48:53 122

原创 HDU - 5491 The Next(思维&二进制)

Let L denote the number of 1s in integer D’s binary representation. Given two integers S1 and S2, we call D a WYH number if S1≤L≤S2.With a given D, we would like to find the next WYH number Y, which...

2019-09-10 09:32:34 119

原创 POJ - 1743 Musical Theme(后缀数组+二分)

A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1…88, each representing a key on the piano. It is unfortunate but true that this representat...

2019-09-06 17:14:08 111

原创 计蒜客-引爆炸弹(并查集)

在一个 n×m 的方格地图上,某些方格上放置着炸弹。手动引爆一个炸弹以后,炸弹会把炸弹所在的行和列上的所有炸弹引爆,被引爆的炸弹又能引爆其他炸弹,这样连锁下去。现在为了引爆地图上的所有炸弹,需要手动引爆其中一些炸弹,为了把危险程度降到最低,请算出最少手动引爆多少个炸弹可以把地图上的所有炸弹引爆。参考题解并查集的思想,只要记录行号和列号就可以了。然后用并查集并在一起,如果能引爆其他炸弹的...

2019-08-31 20:52:41 166

原创 计蒜客 后缀字符串(字典树)

一天蒜头君得到n个字符串Si,每个字符串的长度都不超过 10。蒜头君在想,在这 nnn 个字符串中,以 sis_isi​ 为后缀的字符串有多少个呢?输入格式第一行输入一个整数 n。接下来 n 行,每行输入一个字符串 Si​。输出格式输出 n 个整数,第 i 个整数表示以 Si​ 为后缀的字符串的个数。参考题解#include <bits/stdc++.h>usin...

2019-08-31 19:55:37 182

原创 SPOJ - DISUBSTR Distinct Substrings(后缀数组)

Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. T<=20;Each test case consists of one string, whose length is <= 1000OutputFor each...

2019-08-31 11:55:10 119

原创 HDU - 5877 Weak Pair(dfs序+树状数组)

A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a value of en...

2019-08-26 14:56:21 93 1

原创 HDU3333 Turing Tree(线段树 离线处理)

After inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree could easily have the solution. As well, wily 3xian made lots of new problems about in...

2019-08-24 16:52:07 154

原创 Physical Education Lessons(线段树动态开点)

This year Alex has finished school, and now he is a first-year student of Berland State University. For him it was a total surprise that even though he studies programming, he still has to attend phy...

2019-08-18 16:16:20 217

原创 Count Color(线段树&状压)

Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with length L centimeter, L is...

2019-08-16 21:01:41 191

原创 线段树扫描线+离散化

A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially or totally covered ...

2019-08-16 10:22:05 156

原创 deepin(linux)vscode的tasks.json和launch.json配置文件

参考文章tasks是用在launch前执行的任务,launch是读取执行文件。在当前文件是C++的情况下,tasks可以被用来做编译,而launch用来执行编译好的文件。task.json:// tasks.json{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentatio...

2019-08-15 16:33:45 1753

原创 HDU - 4553 约会安排(线段树)

寒假来了,又到了小明和女神们约会的季节。  小明虽为屌丝级码农,但非常活跃,女神们常常在小明网上的大段发言后热情回复“呵呵”,所以,小明的最爱就是和女神们约会。与此同时,也有很多基友找他开黑,由于数量实在过于巨大,怎么安排时间便成了小明的一大心事。  我们已知小明一共有T的空闲时间,期间会有很多女神或者基友来找小明。  作为一个操作系统曾经怒考71分的大神,小明想到了一个算法,即“首次适应...

2019-08-13 15:45:50 191

原创 Vases and Flowers(线段树+二分)

Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers, she will try to put them in the vases, one flower in one vase. S...

2019-08-13 00:26:43 366

原创 Codeforce #576 D. Welfare State(线段树)

There is a country with n citizens. The i-th of them initially has ai money. The government strictly controls the wealth of its citizens. Whenever a citizen makes a purchase or earns some money, they...

2019-08-01 09:40:54 683

原创 D-query(主席树)

Given a sequence of n numbers a1, a2, …, an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have to return the number of distinct elements in the s...

2019-07-30 21:38:15 107

原创 Super Mario(主席树)

Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Mario needs to save his lover. We regard the road t...

2019-07-30 21:17:01 306 1

原创 Interviewe(RMQ )

YaoYao has a company and he wants to employ m people recently. Since his company is so famous, there are n people coming for the interview. However, YaoYao is so busy that he has no time to interview...

2019-07-25 09:24:59 332

原创 Table with Letters - 2(dp & 队列思想)

Vasya has recently started to learn English. Now he needs to remember how to write English letters. He isn’t sure about some of them, so he decided to train a little.He found a sheet of squared paper...

2019-07-23 13:58:37 126

原创 Codeforces 91B Queue(单调队列 线段树)

There are n walruses standing in a queue in an airport. They are numbered starting from the queue’s tail: the 1-st walrus stands at the end of the queue and the n-th walrus stands at the beginning of...

2019-07-21 22:51:16 290

原创 牛客竞赛暑期多校训练第二场H-Second Large Rectangle(单调栈)

Given a N×M binary matrix. Please output the size of second large rectangle containing all “1”.题目描述:给定一个大小为n×m的矩阵,矩阵中的元素为1或者0,求这个矩阵中的第二大全1矩阵,如果这个矩阵中全1矩阵的个数不够两个就输出0.其中第二大矩阵可以由最大的生成。(这个在题目里我一直没读到,就一...

2019-07-21 10:45:24 106

原创 HDU - 5883 -The Best Path (连通图&欧拉通路)

Alice is planning her travel route in a beautiful valley. In this valley, there are N lakes, and M rivers linking these lakes. Alice wants to start her trip from one lake, and enjoys the landscape by...

2019-07-07 08:45:27 106

原创 Ultra-QuickSort(CDQ分治+线段树或树状数组)

In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted ...

2019-04-17 21:04:41 112

原创 归并排序

归并排序是所有排序算法中最快的算法了吧,O(nlogn)的时间复杂度,只需要一个辅助数组,就能实现排序;基本思想是分治,这种模式也被引入了CDQ分治。(不知道这么说对不对,因为要学习CDQ才记录一下这个排序)首先我们将整个数据分成两个部分,进行子区间内部排序,当然实现方式与大区间的实现方式一样:分为子区间,直至不能再分。这样,我们就可以保证,我们递归处理完两个子区间的问题之后,两个子区间内部都已...

2019-04-15 22:00:51 92

原创 Laptop(线段树&非线段树求偏序 牛客网)

FST是一名可怜的小朋友,他很强,但是经常fst,所以rating一直低迷。但是重点在于,他非常适合ACM!并在最近的区域赛中获得了不错的成绩。拿到奖金后FST决定买一台新笔记本,但是FST发现,在价格能承受的范围内,笔记本的内存和速度是不可兼得的。可是,有一些笔记本是被另外一些“完虐”的,也就是内存和速度都不高于另外某一个笔记本,现在FST想统计一下有多少笔记本被“完虐”。题目链接...

2019-04-13 00:15:49 177

原创 Ultra-QuickSort OpenJ_Bailian - 2299(线段树&树状数组求逆序对)

In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted ...

2019-04-11 15:20:17 165

原创 Mayor's posters OpenJ_Bailian - 2528(线段树离散化)

The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally ...

2019-04-10 16:29:37 141

原创 A Simple Problem with Integers POJ - 3468(线段树)

You have N integers, A1, A2, … , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the s...

2019-04-09 15:12:33 123

原创 CodeChef - CLIQUED Bear and Clique Distances(最短路)

Bearland consists of N cities, numbered 1 through N. Cities are connected with bidirectional roads.Cities 1 through K were built a long time ago, when citizens liked order and regularity. Each pair o...

2019-04-03 20:11:33 111

原创 CSL的字符串(牛客竞赛)

题目链接参考代码(其实本来最早见到这个思想不是这位大佬的,但是由于牛客提交太多了,我参考的那个代码找不到了)解释都放在代码里面了,做了些笔记。#include<bits/stdc++.h>using namespace std;typedef long long LL;const int inf = 0x3f3f3f3f;int cnt[505];bool vis[5...

2019-04-01 20:20:28 197

空空如也

空空如也

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

TA关注的人

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