上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页
摘要: Byteotian Interstellar Union (BIU) has recently discovered a new planet in a nearby galaxy. The planet is unsuitable for colonisation due to strange m 阅读全文
posted @ 2017-07-16 16:33 阿波罗2003 阅读(285) 评论(0) 推荐(0) 编辑
摘要: There are n people and k keys on a straight line. Every person wants to get to the office which is located on the line as well. To do that, he needs t 阅读全文
posted @ 2017-07-16 12:44 阿波罗2003 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(433) 评论(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 阅读(241) 评论(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 阅读(190) 评论(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 阅读(328) 评论(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 阅读(344) 评论(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 阅读(189) 评论(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 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 我先用费用流的方法去跑spfa,然后完美T掉6个点。 就说正解吧,正解是跑两次spfa,然后就可以找出最短路覆盖的边(详细过程请看代码rebuild())。然后建图跑最大流 Code 二分答案,然后奇、偶数分开分别连源点和汇点,两者加起来是素数就加一条边。特殊处理1,只保留一个。 Code 先Tar 阅读全文
posted @ 2017-07-12 11:12 阿波罗2003 阅读(189) 评论(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 阅读(211) 评论(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 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果 阅读全文
posted @ 2017-07-10 12:06 阿波罗2003 阅读(218) 评论(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 阅读(167) 评论(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 阅读(238) 评论(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 阅读(553) 评论(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 阅读(387) 评论(0) 推荐(0) 编辑
摘要: Description 有N个工作,M种机器,每种机器你可以租或者买过来. 每个工作包括若干道工序,每道工序需要某种机器来完成,你可以通过购买或租用机器来完成。 现在给出这些参数,求最大利润 Input 第一行给出 N,M(1<=N<=1200,1<=M<=1200) 下面将有N块数据,每块数据第一 阅读全文
posted @ 2017-07-08 11:10 阿波罗2003 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 3333年,在银河系的某星球上,X军团和Y军团正在激烈地作战。在战斗的某一阶段,Y军团一共派遣了N个巨型机器人进攻X军团的阵地,其中第i个巨型机器人的装甲值为Ai。当一个巨型机器人的装甲值减少到0或者以下时,这个巨型机器人就被摧毁了。X军团有M个激光武器,其中第i个激光武器每秒可以削减一个巨型机器人 阅读全文
posted @ 2017-07-07 16:11 阿波罗2003 阅读(268) 评论(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 阅读(166) 评论(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 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 记忆化搜索,完事。。。 Code 阅读全文
posted @ 2017-07-06 14:31 阿波罗2003 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 给你一个无向带权连通图,每条边是黑色或白色。让你求一棵最小权的恰好有need条白色边的生成树。 题目保证有解。 Input 第一行V,E,need分别表示点数,边数和需要的白色边数。 接下来E行,每行s,t,c,col表示这边的端点(点从0开始标号),边权,颜色(0白色1黑色)。 Output 一行 阅读全文
posted @ 2017-07-06 11:38 阿波罗2003 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 给定一个nxm的网格,请计算三点都在格点上的三角形共有多少个。下图为4x4的网格上的一个三角形。 注意三角形的三点不能共线。 Input 输入一行,包含两个空格分隔的正整数m和n。 Output 输出一个正整数,为所求三角形数量。 Sample Input Sample Output Hint 不难 阅读全文
posted @ 2017-07-06 09:53 阿波罗2003 阅读(235) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页