上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页
摘要: Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that: No two balls share the same l 阅读全文
posted @ 2017-07-15 22:52 阿波罗2003 阅读(286) 评论(0) 推荐(0) 编辑
摘要: Vasily has a deck of cards consisting of n cards. There is an integer on each of the cards, this integer is between 1 and 100 000, inclusive. It is po 阅读全文
posted @ 2017-07-14 16:32 阿波罗2003 阅读(430) 评论(0) 推荐(0) 编辑
摘要: Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be negative, i. e. points w 阅读全文
posted @ 2017-07-14 16:10 阿波罗2003 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Array of integers is unimodal, if: it is strictly increasing in the beginning; after that it is constant; after that it is strictly decreasing. The fi 阅读全文
posted @ 2017-07-14 16:02 阿波罗2003 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Everyone knows that DNA strands consist of nucleotides. There are four types of nucleotides: "A", "T", "G", "C". A DNA strand is a sequence of nucleot 阅读全文
posted @ 2017-07-13 09:30 阿波罗2003 阅读(327) 评论(0) 推荐(0) 编辑
摘要: Arkady needs your help again! This time he decided to build his own high-speed Internet exchange point. It should consist of n nodes connected with mi 阅读全文
posted @ 2017-07-12 17:17 阿波罗2003 阅读(338) 评论(0) 推荐(0) 编辑
摘要: Ivan had string s consisting of small English letters. However, his friend Julia decided to make fun of him and hid the string s. Ivan preferred makin 阅读全文
posted @ 2017-07-12 17:10 阿波罗2003 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Pronlem A In a small restaurant there are a tables for one person and b tables for two persons. Pronlem A In a small restaurant there are a tables for 阅读全文
posted @ 2017-07-12 16:56 阿波罗2003 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 我先用费用流的方法去跑spfa,然后完美T掉6个点。 就说正解吧,正解是跑两次spfa,然后就可以找出最短路覆盖的边(详细过程请看代码rebuild())。然后建图跑最大流 Code 二分答案,然后奇、偶数分开分别连源点和汇点,两者加起来是素数就加一条边。特殊处理1,只保留一个。 Code 先Tar 阅读全文
posted @ 2017-07-12 11:12 阿波罗2003 阅读(181) 评论(0) 推荐(0) 编辑
摘要: John is the only priest in his town. September 1st is the John's busiest day in a year because there is an old legend in the town that the couple who 阅读全文
posted @ 2017-07-11 12:05 阿波罗2003 阅读(204) 评论(0) 推荐(0) 编辑
摘要: liympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many times, he is tired of such easy 阅读全文
posted @ 2017-07-11 09:49 阿波罗2003 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果 阅读全文
posted @ 2017-07-10 12:06 阿波罗2003 阅读(215) 评论(0) 推荐(0) 编辑
摘要: Dandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to distribute rewards to his workers. Now he has a trouble about 阅读全文
posted @ 2017-07-10 12:00 阿波罗2003 阅读(166) 评论(0) 推荐(0) 编辑
摘要: ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like 阅读全文
posted @ 2017-07-10 11:57 阿波罗2003 阅读(232) 评论(0) 推荐(0) 编辑
摘要: It's well known that the best way to distract from something is to do one's favourite thing. Job is such a thing for Leha. So the hacker began to work 阅读全文
posted @ 2017-07-10 11:51 阿波罗2003 阅读(540) 评论(0) 推荐(0) 编辑
摘要: You have n devices that you want to use simultaneously. The i-th device uses ai units of power per second. This usage is continuous. That is, in λ sec 阅读全文
posted @ 2017-07-09 23:09 阿波罗2003 阅读(376) 评论(0) 推荐(0) 编辑
摘要: Description 有N个工作,M种机器,每种机器你可以租或者买过来. 每个工作包括若干道工序,每道工序需要某种机器来完成,你可以通过购买或租用机器来完成。 现在给出这些参数,求最大利润 Input 第一行给出 N,M(1<=N<=1200,1<=M<=1200) 下面将有N块数据,每块数据第一 阅读全文
posted @ 2017-07-08 11:10 阿波罗2003 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 3333年,在银河系的某星球上,X军团和Y军团正在激烈地作战。在战斗的某一阶段,Y军团一共派遣了N个巨型机器人进攻X军团的阵地,其中第i个巨型机器人的装甲值为Ai。当一个巨型机器人的装甲值减少到0或者以下时,这个巨型机器人就被摧毁了。X军团有M个激光武器,其中第i个激光武器每秒可以削减一个巨型机器人 阅读全文
posted @ 2017-07-07 16:11 阿波罗2003 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an inter 阅读全文
posted @ 2017-07-06 17:45 阿波罗2003 阅读(156) 评论(0) 推荐(0) 编辑
摘要: A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program 阅读全文
posted @ 2017-07-06 14:41 阿波罗2003 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 记忆化搜索,完事。。。 Code 阅读全文
posted @ 2017-07-06 14:31 阿波罗2003 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 给你一个无向带权连通图,每条边是黑色或白色。让你求一棵最小权的恰好有need条白色边的生成树。 题目保证有解。 Input 第一行V,E,need分别表示点数,边数和需要的白色边数。 接下来E行,每行s,t,c,col表示这边的端点(点从0开始标号),边权,颜色(0白色1黑色)。 Output 一行 阅读全文
posted @ 2017-07-06 11:38 阿波罗2003 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 给定一个nxm的网格,请计算三点都在格点上的三角形共有多少个。下图为4x4的网格上的一个三角形。 注意三角形的三点不能共线。 Input 输入一行,包含两个空格分隔的正整数m和n。 Output 输出一个正整数,为所求三角形数量。 Sample Input Sample Output Hint 不难 阅读全文
posted @ 2017-07-06 09:53 阿波罗2003 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 这是一个向导 A - hdu 3652 B - bzoj 4152 C - bzoj 2429 D - bzoj 1087 E - bzoj 1566 F - bzoj 4043 G - bzoj 1052 H - bzoj 2957 I - bzoj 2463 J - bzoj 2190 Prob 阅读全文
posted @ 2017-07-05 17:42 阿波罗2003 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 直接暴力模拟,注意判数据结构为空时的取出操作。 Code 考虑只有两个任务的时候,只有两种情况,它们的答案分别是和。又因为,所以有,,所以它们的谁更优取决于。即d值的大小。 现在考虑多个任务的时候,先随便安排一种执行任务的顺序,如果存在有关d值的逆序对,那么说明当前这个顺序一定不优,我们可以通过交换 阅读全文
posted @ 2017-07-03 18:20 阿波罗2003 阅读(161) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页