随笔分类 - ICPC算法生涯
摘要:Description Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such th
阅读全文
摘要:Quoit Design Problem Description Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all th
阅读全文
摘要:题目描述 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于前一发的高度。某天,雷达捕捉到敌国的导弹来袭。由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹。 输入导弹依次飞来的高
阅读全文
摘要:Now give you an string which only contains 0, 1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9.You are asked to add the sign ‘+’ or ’-’ between the characters. Just like giv
阅读全文
摘要:Count Color Description Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get
阅读全文
摘要:Description 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 e
阅读全文
摘要:The first blood HDU 2041 超级楼梯 Problem Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input 输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1<=M<
阅读全文
摘要:Problem Description The inversion number of a given number sequence a1, a2, …, an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. For
阅读全文
摘要:题目描述 Eddy was a contestant participating in ACM ICPC contests. ACM is short for Algorithm, Coding, Math. Since in the ACM contest, the most important
阅读全文
摘要:题目描述 Eddy likes to play cards game since there are always lots of randomness in the game. For most of the cards game, the very first step in the game
阅读全文
摘要:1 向量 这里就不介绍向量的加法和减法,着重介绍一下向量的叉积的作用和代码实现 a), 可以判断点在直线的左边还是右边 ad: POJ2318(当时poj挂了进不去) b), 计算三角形的面积 ( 两个向量的叉积的1/2的绝对值 ) c),在计算凸包中起到了重要作用 ( 下面会讲 ) 当然了可能会用
阅读全文
摘要:数论基本定理 (1).唯一分解定理 一句话: 任何大于1的自然数,都可以唯一分解成有限个质数的乘积 例如对于大于1的自然数n, N = p1r1p1r1 * p2r2p2r2 * p3r3p3r3 * * * * * * pnrnpnrn ( ps: p1,p2,p2都是质数 ) 代码实现: 用途:
阅读全文
摘要:Just a Hook Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 41010 Accepted Submission(s): 19775
阅读全文
摘要:I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 96984 Accepted Submission(s): 36624 Pr
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/139/J 来源:牛客网 题目描述 Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ...
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/140/A 来源:牛客网 题目描述 White Cloud is exercising in the playground. White Cloud can walk 1 meters or run k meters p
阅读全文
摘要:题目描述: 南将军麾下有百万精兵,现已知共有M个士兵,编号为0~M,每次有任务的时候,总会有一批编号连在一起人请战(编号相近的人经常在一块,相互之间比较熟悉),最终他们获得的军功,也将会平分到每个人身上,这样,有时候,计算他们中的哪一个人到底有多少军功就是一个比较困难的事情。 在这样的情况下,南将军
阅读全文
摘要:time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output time limit per test 1 second time limit p
阅读全文
摘要:C. Nastya and a Wardrobe time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Nastya and a
阅读全文
摘要:问题编号 问题名称 问题模型 转化模型 1 飞行员配对方案问题 二分图最大匹配 网络最大流 2 太空飞行计划问题 最大权闭合图 网络最小割 3 最小路径覆盖问题 有向无环图最小路径覆盖 网络最大流 4 魔术球问题 有向无环图最小路径覆盖 网络最大流 5 圆桌问题 二分图多重匹配 网络最大流 6 最长
阅读全文

浙公网安备 33010602011771号