自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(78)
  • 收藏
  • 关注

原创 后端开发 面试题整理

文章目录C/C++引用和指针的区别堆、栈STL_Map虚函数C++的构造函数可以是虚函数吗?解决哈希冲突的方法C++的struct和类的区别面向对象的三大特性多态的实现区分重载、重写和隐藏。五大基本原则Struct 和 Union有下列区别:define和const区别:staticconstNew/delete. Malloc/free.vector和list的区别常量指针和指针常量内存泄漏智...

2020-03-29 14:28:53 1801

原创 #错排问题# 不容易系列之(4)——考新郎

题目链接Problem Description 国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做”考新郎”,具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排; 然后,让各位新郎寻找自己的新娘.每人只准找一个,并且不允许多人找一个. 最后,揭开盖头,如果找错了对象就要当众跪搓衣板…...

2019-09-10 21:04:31 379

原创 线性基总结(ing)

一篇超棒的博客另一篇很棒的博客前言可以将线性基理解为是将一个序列处理完之后得到的产物。线性基是一个集合,在原集合中找到一个子集,子集中的数异或起来一定能在线性基中找一个对应子集的异或和与其相等。比如说,{x,y} 和 {x, x^y} 就满足这样一个关系。性质原序列里面的任意一个数都有唯一方案由线性基中元素异或得到。在线性基中任取若干个元素,它们的异或不为零。即它们线性无关。线性...

2019-08-22 16:27:08 264

原创 【期望】【DP】数学期望总结(ing)

LightOJ - 1027 A Dangerous Maze

2019-08-15 19:51:03 489

原创 【数论】【DP】【LCM】2018 USP-ICMC【待补】

比赛传送门A. Nicoleta and the circle of kidsDescription每个人可以连边,最远连到第(i+k)%n 个人,边权为两个人之间的距离,求最大生成树Range1 ≤ K < N ≤ 1e9Solution方案一:LCM如果每个人都选取最优的连边策略,假设在人数可以无限扩大的前提下,那么每个人都可以向接下来的第k个人连边,很容易得出一个循环节...

2019-04-15 01:28:54 493 6

原创 ThinkPHP5开发常见问题解决 - 1

批量替换路径Ctrl + R 快捷键进行替换

2019-04-01 20:12:13 456

原创 【容斥】2017 ACM Arabella Collegiate Programming Contest

比赛连接G. Snake RanaOld Macdonald wants to build a new hen house for his hens. He buys a new rectangular area of size N by M. The night before he builds the hen house, snake Rana devises an evil plan t...

2019-03-19 12:40:16 237

原创 【DFS】codeforces 638 B. Making Genome in Berland

题目链接Berland scientists face a very important task - given the parts of short DNA fragments, restore the dinosaur DNA! The genome of a berland dinosaur has noting in common with the genome that we’ve ...

2019-03-11 21:52:11 302

原创 【DP】 Codeforces Round 536 (Div. 2) E. Lunar New Year and Red Envelopes

题目地址:https://codeforces.com/contest/1106/problem/ELunar New Year is approaching, and Bob is going to receive some red envelopes with countless money! But collecting mo...

2019-02-19 00:00:00 191

原创 CCPC-Wannafly Winter Camp(秦皇岛)Day3:数据结构学习记录

本来这几天带着感冒,连连续续一直在发烧,再加上没有休息时间的时间安排,实在是有些顶不住了,跟完一天的训练后只能勉强的补个题,题没补完题解也写不动。但是,听说安神要收题解之后,那是一定顶得住的,趁着前一天睡得早今天抓紧机会肝一下。因为补题功能还不完善,看不到AC实在是不敢写题解,就把上午讲的线段树的一些例题给写了一波题解。Problem 1题目链接:BZOJ4423: [AMPPZ2013] ...

2019-01-29 15:46:26 377

原创 #DFS、期望# Codeforces Round #428 (Div. 2) C. Journey

题目链接:https://codeforces.com/contest/839/problem/CC. JourneyThere are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roa...

2019-01-17 15:18:02 255

原创 博客的功能配置

主要有以下功能配置:添加「标签」页面添加「分类」页面添加「关于」页面用hexo发表新文章1.添加「标签」页面新建页面hexo new page tags修改站点目录下 source/tags 的 index.md 文件如下:---title: tagstype: &amp;amp;amp;amp;amp;amp;quot;tags&amp;amp;amp;amp;amp;amp;quot;comments: false---修改主题配置文件,取消 #tag

2019-01-13 14:25:24 207

原创 博客的美化配置(NexT主题)

从 Hexo 的官网选取主题1.选取主题可以选择喜欢的主题,点击进入到它的 github 地址,只需要把 GitHub 的地址复制下来即可。我选择的主题为:hexo-theme-next,所以下面的配置也会以 next 为例。2.克隆主题再打开Hexo文件夹下的themes目录(F:\Blog\hexo\themes),右键Git Bash,在命令行输入:git clone htt...

2019-01-13 02:03:30 728

原创 利用 Github Pages 和 Hexo 初步搭建博客

欢迎各位大佬来参观我的博客:AmosMeer’s Blog搭建过程中出现的任何问题请参考博客:常见问题解决完整的博客搭建过程的文章汇总:利用 Github Pages 和 Hexo 初步搭建博客博客的美化及功能配置利用 Github Pages 和 Hexo 搭建博客常见问题解决环境准备1. 安装Node.js在 Windows 环境下安装 Node.js 非常简单,仅须到官...

2019-01-12 23:49:13 653 1

原创 利用 Github Pages 和 Hexo 搭建博客常见问题解决

常见问题1. 出现 npm: command not found有 git bash,也安装了 node.js, 但是在运行 bash 时依旧会报错 npm: command not found解决方案:需要改成全局安装。npm install grunt :本地安装npm install -g grunt-cli :全局安装在cmd 下输入以下内容就可以了:npm instal...

2019-01-12 17:10:10 744

原创 #线段树# 2018-2019 ICPC,NEERC,Southern Subregional Contest (Online Mirror, ACM-ICPC)C. Cloud Computing

题目链接:http://codeforces.com/contest/1070/problem/CBuber is a Berland technology company that specializes in waste of investor’s money. Recently Buber decided to transfer its infrastructure to a cloud....

2018-12-09 15:01:35 258

原创 fold的毒瘤题(easy)

题目链接:http://120.78.128.11/Problem.jsp?pid=3250给出一幅有n(≤50)个点, m(≤500)条边的无向图. 保证任意2点间都至少存在一条路径可以连通, 每条边上都有一个权值Vi(≤500)。不幸的是, 这m条边都被损坏了。fold打算修复其中一些边让一些点连通, 不过, fold并不打算让全部的点连通, 而是选择一些编号特殊的点让它们连通.fold有...

2018-10-24 22:38:28 298

原创 #BFS# 2016-2017 ACM-ICPC Northwestern European Regional Programming Contest (NWERC 2016)

2016-2017 ACM-ICPC Northwestern European Regional Programming Contest (NWERC 2016)Problem I Iron and Coal题目链接:http://codeforces.com/gym/101170/attachmentsThere are many excellent strategy board gam...

2018-10-21 19:58:28 587

原创 解决 PHP Interpreter is not configured Please configure PHP Interpreter to use built-in web server

2018-10-18 18:21:46 13052 1

原创 #dp# 2018-2019 ACM-ICPC, NEERC, Southern Subregional Contest, Qualification Stage

K. Medians and Partition代码:#include &amp;amp;lt;cstdio&amp;amp;gt;#include &amp;amp;lt;cstring&amp;amp;gt;#include &amp;amp;lt;string&amp;amp;gt;#include &amp;amp;lt;cmath&amp;amp;gt;#include &amp;amp;lt;cstdlib&am

2018-10-17 01:11:15 940 2

原创 #递归、DP# 2749: 分解因数

题目链接:http://bailian.openjudge.cn/practice/2749/描述给出一个正整数a,要求分解成若干个正整数的乘积,即a = a1 * a2 * a3 * ... * an,并且1 &lt; a1 &lt;= a2 &lt;= a3 &lt;= ... &lt;= an,问这样的分解的种数有多少。注意到a = a也是一种分解。输入第1行是测试数据的组数...

2018-09-17 21:55:58 379 1

原创 #数论# 快速分解质因数的技巧 && 筛法求素数(快速筛)

快速分解质因数在做题时经常遇到要分解质因数,那么如何快速分解质因数呢?在用筛法求素数时,我们使用线性筛的方法,并在每次筛的过程中,记录下每个数的最小质因数。那么在分解质因数的时候,只需要不断除以当前数的最小质因数,就可以快速得到分解的质因数了。给出一个简单的例子,比如我们要求 50 这个数的质因数:首先,利用线性筛找到所有的素数,并记录非素数的最小质因数,然后再将数字 50 除以他...

2018-09-17 21:46:31 2505

原创 #数论、分层最短路# ACM-ICPC 2018 南京赛区网络预赛

题目链接An Olympian Math ProblemAlice, a student of grade 66, is thinking about an Olympian Math problem, but she feels so despair that she cries. And her classmate, Bob, has no idea about the problem...

2018-09-04 21:44:58 242

原创 #数论、离散化、树状数组# 2018中国大学生程序设计竞赛 - 网络选拔赛

题目链接 1001. Buy and ResellProblem DescriptionThe Power Cube is used as a stash of Exotic Power. There are n cities numbered 1,2,…,n where allowed to trade it. The trading price of the Power Cub...

2018-08-27 22:31:54 332

原创 #二分、二叉树# 一节左神公开课的题解

题目1:二分查找局部最小值 Description:定义局部最小的概念。arr 长度为1时,arr[0] 是局部最小。arr的长度为 N(N &gt; 1) 时,如果 arr[0] &lt; arr[1],那么 arr[0] 是局部最小;如果 arr[N-1] &lt; arr[N-2],那么 arr[N-1] 是局部最小;如果 0 &lt; i&lt; N-1,既有 arr[i] &...

2018-08-25 23:23:17 280

原创 Codeforces911 D. Inversion Counting(逆序数)

题目链接:http://codeforces.com/problemset/problem/911/DD. Inversion CountingA permutation of size n is an array of size n such that each integer from 1 to n occurs exactly once in this array. An inver...

2018-08-25 23:08:30 320

原创 "字节跳动杯"2018中国大学生程序设计竞赛-女生专场(ing)

1002. 口算训练题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6287Problem Description小Q非常喜欢数学,但是他的口算能力非常弱。因此他找到了小T,给了小T一个长度为n的正整数序列a1,a2,...,an,要求小T抛出m个问题以训练他的口算能力。每个问题给出三个正整数l,r,d,小Q需要通过口算快速判断al×al...

2018-08-24 23:25:47 818

原创 0-1字典树总结和经典例题(ing)

Table of Contents0-1字典树例题1. CSU 1216:异或最大值:给定一些数,任意两个数的最大异或值例题2.HDU 4825Xor Sum:每次询问给出一个数,找出一个与它异或结果最大的数例题3.HDU 5536Chip Factory: 计算(s[i] + s[j]) ^ s[k] 的最大值例题4.POJ 3764The xor-longe...

2018-08-15 21:50:02 1188

原创 2018 Multi-University Training Contest 1 1004. Distinct Values

Problem DescriptionChiaki has an array of n positive integers. You are told some facts about the array: for every two elements ai and aj in the subarray al..r (l≤i&lt;j≤r), ai≠ajholds.Chiaki would ...

2018-08-14 19:29:51 179

原创 #滑动窗口 + 单调队列# 2018 Multi-University Training Contest 3 Problem A. Ascending Rating

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6319 Problem DescriptionBefore the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled by 1 to n from left t...

2018-08-13 13:18:53 194

原创 J-强迫症的序列 第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛

题目链接:https://www.nowcoder.com/acm/contest/90/J题目描述 牛客网是IT求职神器,提供海量C++、JAVA、前端等职业笔试题库,在线进行百度阿里腾讯网易等互联网名企笔试面试模拟考试练习,和牛人一起讨论经典试题,全面提升你的编程。作为acmer的小A,牛客网是他首选的题库。 小A是一个中度强迫症患者,每次做数组有关的题目都异常难受,他十分希望数组的...

2018-08-09 21:37:02 271

原创 【异或】HDU - 4810 Wall Painting

Wall PaintingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3857 Accepted Submission(s): 1278Problem DescriptionMs.Fang loves painting very much. She paints GFW(Great Funny Wall) every day.

2018-08-09 14:57:39 221

原创 #树状数组# POJ 2481 Cows

DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good. Farmer ...

2018-08-07 09:45:38 277

原创 树状数组(Binary Indexed Tree) 总结(ing)

推荐一篇很好的博客:http://www.cppblog.com/menjitianya/archive/2015/11/02/212171.html一、树状数组的定义基本定义:树状数组是利用二分的思想使得查询和修改的复杂度都为 log(n) 的数据结构,树状数组是通过前缀和思想,用来完成单点更新和区间查询的数据结构。如上图,不难看出树状数组是一个不断地二分的过程。 如上图...

2018-08-06 23:09:23 1920

原创 【树状数组+离散化】【逆序对】 POJ 2299 Ultra-QuickSort

题目链接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 so...

2018-08-06 22:50:34 303

原创 #DFS序+二分+前缀和# Codeforces Round #381 (Div. 1) B. Alyona and a tree

题目链接B. Alyona and a treetime limit per test  2 secondsmemory limit per test  256 megabytesinput  standard inputoutput  standard outputAlyona has a tree with n vertices. The root of the tre...

2018-08-06 09:59:16 293

原创 Codeforces Round #501 (Div. 3) E2. Stars Drawing (Hard Edition)

题目链接A star is a figure of the following type: an asterisk character '*' in the center of the figure and four rays (to the left, right, top, bottom) of the same positive length. The size of a star is...

2018-08-04 23:57:50 500

原创 #&运算# 牛客练习赛23 C.托米的位运算

链接:https://www.nowcoder.com/acm/contest/156/C时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述托米完成了1317的上一个任务,十分高兴,可是考验还没有结束说话间1317给了托米 n 个自然数 a1... an, 托米可以选出一些带回家,...

2018-08-04 21:21:25 264

原创 异或、异或和 的性质及应用总结

一:异或的含义或在数学中的含义:一个元素在集合A中或在集合B中,或的维恩图如下:而异或是不允许共存的,所以 A ^ B 的维恩图如下:同理对于 A ^ B ^ C 维恩图: 异或运算{\displaystyle A\oplus B} 的真值表如下:F表示false,T代表trueA B ⊕ F F F F T T ...

2018-08-04 17:19:48 21270 2

原创 Codeforces Technocup 2018 - Elimination Round 2 C. Maximum splitting

题目链接You are given several queries. In the i-th query you are given a single positive integer ni. You are to represent ni as a sum of maximum possible number of composite summands and print this maxi...

2018-07-26 16:21:57 208

空空如也

空空如也

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

TA关注的人

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