【CodeForces - 266B 】Queue at the School (模拟)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84036415 题干: During the break the schoolchildren, boys and girls, formed a queue of n people in the canteen. Initially the children stood in the order they entered the can
分类: 其他 发布时间: 11-22 23:53 阅读次数: 0

【CodeForces - 270A】Fancy Fence (几何,思维,水题)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84205366 题干: Emuskald needs a fence around his farm, but he is too lazy to build it himself. So he purchased a fence-building robot. He wants the fence to be a regular pol
分类: 其他 发布时间: 11-22 23:53 阅读次数: 0

【CodeForces - 271B 】Prime Matrix (素数,预处理打表,思维)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84205479 题干: You've got an n × m matrix. The matrix consists of integers. In one move, you can apply a single transformation to the matrix: choose an arbitrary element of
分类: 其他 发布时间: 11-22 23:53 阅读次数: 0

【CodeForces - 270C】Magical Boxes (思维,进制,有坑)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84205699 题干: Emuskald is a well-known illusionist. One of his trademark tricks involves a set of magical boxes. The essence of the trick is in packing the boxes inside oth
分类: 其他 发布时间: 11-22 23:53 阅读次数: 0

【Effect CodeForces - 270D】Greenhouse (思维,最长非递减子序列,对偶问题,考虑反面)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84236195 题干: Emuskald is an avid horticulturist and owns the world's longest greenhouse — it is effectively infinite in length. Over the years Emuskald has cultivated n pl
分类: 其他 发布时间: 11-22 23:52 阅读次数: 0

【CodeForces - 219D 】Choosing Capital for Treeland (树形dp)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84237144 题干: The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Overall there are n - 1 roads in the country. We know t
分类: 其他 发布时间: 11-22 23:52 阅读次数: 0

【HihoCoder - 1880】地铁环线 (前缀和,水题,模拟)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84247791 题干: H市有一环线地铁,一共包含N站,编号1~N。正向行驶的地铁会按1 -> 2 -> 3 -> ... -> N -> 1的方向行驶,反向会按1 -> N -> N-1 -> ... -> 3 -> 2 -> 1的方向行驶。 给定所有相邻两站之间地铁行驶的时间(正向、反向时间相同),假设小Hi要从第X站到第Y站,请你判
分类: 其他 发布时间: 11-22 23:52 阅读次数: 0

【HihoCoder - 1881】特殊任务 (树形图,遍历)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84250298 题干: H公司一共有N名员工,编号1~N,其中CEO是1号员工。除了CEO之外,其他员工都有唯一的直接上司,所以N名员工上下级关系恰好形成了一棵树形结构。 我们知道每一名员工向H公司的代码库贡献了多少行代码。具体来说,第i名员工贡献了Ai行代码。 现在有一项特殊的任务需要2名员工完成,这两名员工需要满足: 1. 其中一名是
分类: 其他 发布时间: 11-22 23:52 阅读次数: 0

关于vector的size()的使用问题

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84109673 vector<int> vec; for (int i = 0; i <= vec.size() - 1; i++) { vec[i] } 这里会有个隐藏问题,当vec的size为0时,因为size()函数的返回值是无符号整型,这时vec.size() - 1是一个正数,导致vec[i]的访问越界 所以写i<size()
分类: 其他 发布时间: 11-22 23:51 阅读次数: 0

【CodeVS - 3639】(树的重心模板,裸题)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/83933631 题干: 题目描述 Description 给出一棵树,求出树的中心。 为了定义树的中心,首先给每个结点进行标号。对于一个结点K,如果把K从树中删除(连同与它相连的边一起),剩下的被分成了很多块,每一块显然又是一棵树(即剩下的部分构成了一个森林)。则给结点K所标的号就是森林中结点个数最多的树所拥有的结点数。如果结点K的标号不
分类: 其他 发布时间: 11-22 23:51 阅读次数: 0

【HYSBZ - 1088 】扫雷Mine (简单dp)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/83927310 题干: 相信大家都玩过扫雷的游戏。那是在一个n*m的矩阵里面有一些雷,要你根据一些信息找出雷来。万圣节到了 ,“余”人国流行起了一种简单的扫雷游戏,这个游戏规则和扫雷一样,如果某个格子没有雷,那么它里面的数字 表示和它8连通的格子里面雷的数目。现在棋盘是n×2的,第一列里面某些格子是雷,而第二列没有雷,如下图: 由于第一列
分类: 其他 发布时间: 11-22 23:51 阅读次数: 0

【CodeForces - 527C】Glass Carving(线段树或者SBT或者set)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84197771 题干: Leonid wants to become a glass carver (the person who creates beautiful artworks by cutting the glass). He already has a rectangular w mm  ×  h mm sheet of gl
分类: 其他 发布时间: 11-22 23:51 阅读次数: 0

【HihoCoder - 1850】字母去重 (字符串,思维)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84258220 题干: 给定一个字符串S,每次操作你可以将其中任意一个字符修改成其他任意字符。 请你计算最少需要多少次操作,才能使得S中不存在两个相邻的相同字符。 Input 只包含小写字母的字符串S。 1 ≤ |S| ≤ 100000 Output 一个整数代表答案 Sample Input aab Sample Output 1
分类: 其他 发布时间: 11-22 23:50 阅读次数: 0

【HihoCoder - 1851】D级上司 (树形图,dfs)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84258468 题干: H公司一共有N名员工,编号为1~N,其中CEO的编号是1。除了CEO之外,每名员工都恰好有唯一的直接上司;N名员工形成了一个树形结构。 我们定义X的1级上司是他的直接上司,2级上司是他上司的上司,以此类推…… 请你找出每名员工的D级上司是谁。 Input 第一行包含2个整数N和D。 以下N-1行每行包含一个整数,依
分类: 其他 发布时间: 11-22 23:50 阅读次数: 0

[分享]《Flask Web开发:基于Python的Web应用开发实战(第2版)》中文PDF+源代码

下载:FlaskWeb开发第二版《FlaskWeb开发:基于Python的Web应用开发实战》第二版中文PDF,324页,带目录和书签,文字能够复制粘贴;配套源代码;经典书籍第二版,讲解详细,分三部分,全面介绍如何基于Python微框架Flask进行Web开发。如图:
分类: 编程语言 发布时间: 11-22 23:50 阅读次数: 0

给各位ACMer,OIer详细介绍一下Codeforces比赛

Codeforces 简称: cf(所以谈论cf的时候经常被误会成TX的那款游戏). 网址: codeforces.com   这是一个俄国的算法竞赛网站,由来自萨拉托夫州立大学、由Mike Mirzayanov领导的一个团队创立和维护,是一个举办比赛、做题和交流的平台.举办比赛和做题就不说了,“交流”指的是自带blog功能,可以求助/发布题解之类.官方语言是俄语和英语,因此可能有些偏僻的题目的题解是用俄语写的,别慌,扔给Google Translate翻成英文,可读性还是很不错的.至于英语,
分类: 其他 发布时间: 11-22 23:50 阅读次数: 0

【CodeForces - 278C 】Learning Languages(并查集,思维)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84310456 题干: The "BerCorp" company has got n employees. These employees can use m approved official languages for the formal correspondence. The languages are numbered wit
分类: 其他 发布时间: 11-22 23:50 阅读次数: 0

【CodeForces - 151C】Win or Freeze (博弈,数学,唯一素数分解)

版权声明:欢迎学习我的博客,希望ACM的发展越来越好~ https://blog.csdn.net/qq_41289920/article/details/84327945 题干: You can't possibly imagine how cold our friends are this winter in Nvodsk! Two of them play the following game to warm up: initially a piece of paper has an i
分类: 其他 发布时间: 11-22 23:49 阅读次数: 0

快速傅里叶变换FFT的学习笔记二:深入实践

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kangweijian/article/details/83588224 快速傅里叶变换FFT的学习笔记二:深入实践 快速傅里叶变换(Fast Fourier Transform)是离散傅里叶变换的一种快速算法,简称FFT,通过FFT可以将一个信号从时域变换到频域。 数据结构 通过AD采集到一串时域上的数据点,一个int型的数组 unsigned int input[SAMPLE_LEN]; f
分类: 其他 发布时间: 11-22 23:49 阅读次数: 0

Android最大方法数和解决方案

在build.gradle中添加:multiDexEnabled true 加入依赖‘compile ‘com.android.support:multidex:1.0.1’’加入依赖‘compile ‘com.android.support:multidex:1.0.1’’ 让应用的Application类直接使用或者继承MultiDexApplication让应用的Application类直接使用或者继承MultiDexApplication 如果你想使用自定义的Application,又
分类: 其他 发布时间: 11-22 23:49 阅读次数: 0