08 2017 档案

摘要:The city planners plan to build N plants in the city which has M shops. Each shop needs products from some plants to make profit of proiproi units. Bu 阅读全文
posted @ 2017-08-25 10:41 joeylee97 阅读(140) 评论(0) 推荐(0) 编辑
摘要:The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all pl 阅读全文
posted @ 2017-08-25 10:35 joeylee97 阅读(188) 评论(0) 推荐(0) 编辑
摘要:Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star 阅读全文
posted @ 2017-08-25 10:33 joeylee97 阅读(238) 评论(0) 推荐(0) 编辑
摘要:百度科技园内有nn个零食机,零食机之间通过n−1n−1条路相互连通。每个零食机都有一个值vv,表示为小度熊提供零食的价值。 由于零食被频繁的消耗和补充,零食机的价值vv会时常发生变化。小度熊只能从编号为0的零食机出发,并且每个零食机至多经过一次。另外,小度熊会对某个零食机的零食有所偏爱,要求路线上必 阅读全文
posted @ 2017-08-25 10:14 joeylee97 阅读(252) 评论(0) 推荐(0) 编辑
摘要:我们称一个长度为2n的数列是有趣的,当且仅当该数列满足以下三个条件: (1)它是从1到2n共2n个整数的一个排列{ai}; (2)所有的奇数项满足a1<a3<…<a2n-1,所有的偶数项满足a2<a4<…<a2n; (3)任意相邻的两项a2i-1与a2i(1≤i≤n)满足奇数项小于偶数项,即:a2i 阅读全文
posted @ 2017-08-25 10:10 joeylee97 阅读(952) 评论(0) 推荐(0) 编辑
摘要:Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single box are of t 阅读全文
posted @ 2017-08-25 10:07 joeylee97 阅读(189) 评论(0) 推荐(0) 编辑
摘要:任何正整数都能分解成2的幂,给定整数N,求N的此类划分方法的数量!由于方案数量较大,输出Mod 1000000007的结果。 比如N = 7时,共有6种划分方法。 7=1+1+1+1+1+1+1 =1+1+1+1+1+2 =1+1+1+2+2 =1+2+2+2 =1+1+1+4 =1+2+4 Inp 阅读全文
posted @ 2017-08-25 10:05 joeylee97 阅读(578) 评论(0) 推荐(0) 编辑
摘要:1007: 易碎的鸟蛋 题目描述 你们知道吗?西电的跳楼塔上面有一个鸟巢。某SXBK的教授对这个鸟巢很感兴趣。经过仔细观察,他发现鸟巢中有若干枚蛋。于是他想利用这些蛋做一个试验。测试一下蛋的坚固程度。这些蛋应该是具有相同的坚硬度。存在一个非负整数E,如果从塔的第E层往下扔蛋,蛋不会破,但如果从第E+ 阅读全文
posted @ 2017-08-21 16:00 joeylee97 阅读(195) 评论(0) 推荐(0) 编辑
摘要:The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The sho 阅读全文
posted @ 2017-08-21 13:42 joeylee97 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台,高度为零,长度无限。 Jimmy老鼠在时刻0从高于所有平台的某处开始下落,它的下落速度始终为1米/秒。当Jimmy落到某个平台上时,游戏者选择让它向左还是向右跑,它跑动的速度也是1米/ 阅读全文
posted @ 2017-08-21 13:41 joeylee97 阅读(162) 评论(0) 推荐(0) 编辑
摘要:On his trip to Luxor and Aswan, Sagheer went to a Nubian market to buy some souvenirs for his friends and relatives. The market has some strange rules 阅读全文
posted @ 2017-08-21 13:40 joeylee97 阅读(163) 评论(0) 推荐(0) 编辑
摘要:Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is 阅读全文
posted @ 2017-08-21 13:39 joeylee97 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is 阅读全文
posted @ 2017-08-21 13:05 joeylee97 阅读(240) 评论(0) 推荐(0) 编辑
摘要:The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies a 阅读全文
posted @ 2017-08-21 12:58 joeylee97 阅读(138) 评论(0) 推荐(0) 编辑
摘要:There 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 roads. Theon a 阅读全文
posted @ 2017-08-21 12:57 joeylee97 阅读(297) 评论(0) 推荐(0) 编辑
摘要:Petra and Jan have just received a box full of free goodies, and want to divide the goodies between them. However, it is not easy to do this fairly, s 阅读全文
posted @ 2017-08-21 12:55 joeylee97 阅读(346) 评论(0) 推荐(0) 编辑
摘要:Suppose there are the symbols M, I, and U which can be combined to produce strings of symbols called "words". We start with one word MI, and transform 阅读全文
posted @ 2017-08-21 12:49 joeylee97 阅读(249) 评论(0) 推荐(0) 编辑
摘要:Gigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance. It orders two arms of negli 阅读全文
posted @ 2017-08-21 12:46 joeylee97 阅读(196) 评论(0) 推荐(0) 编辑
摘要:You will be given a string which only contains ‘1’; You can merge two adjacent ‘1’ to be ‘2’, or leave the ‘1’ there. Surly, you may get many differen 阅读全文
posted @ 2017-08-19 09:29 joeylee97 阅读(231) 评论(0) 推荐(0) 编辑
摘要:现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 Input测试输入包含若干测试用例。 阅读全文
posted @ 2017-08-19 09:27 joeylee97 阅读(272) 评论(0) 推荐(0) 编辑
摘要:Bessie and her friend Elsie decide to have a meeting. However, after Farmer John decorated his fences they were separated into different blocks. John' 阅读全文
posted @ 2017-08-19 09:26 joeylee97 阅读(264) 评论(0) 推荐(0) 编辑
摘要:Alice is going to take all her savings out of the ATM(Automatic Teller Machine). Alice forget how many deposit she has, and this strange ATM doesn't s 阅读全文
posted @ 2017-08-19 09:24 joeylee97 阅读(150) 评论(0) 推荐(0) 编辑
摘要:Jim has a balance and N weights. (1≤N≤20)(1≤N≤20) The balance can only tell whether things on different side are the same weight. Weights can be put o 阅读全文
posted @ 2017-08-19 09:22 joeylee97 阅读(191) 评论(0) 推荐(0) 编辑
摘要:bobo has a sequence a 1,a 2,…,a n. He is allowed to swap twoadjacent numbers for no more than k times. Find the minimum number of inversions after his 阅读全文
posted @ 2017-08-19 09:20 joeylee97 阅读(200) 评论(0) 推荐(0) 编辑
摘要:Given a number x, ask positive integer y≥2y≥2, that satisfy the following conditions: 1. The absolute value of y - x is minimal 2. To prime factors de 阅读全文
posted @ 2017-08-19 09:19 joeylee97 阅读(126) 评论(0) 推荐(0) 编辑
摘要:nn pagodas were standing erect in Hong Jue Si between the Niushou Mountain and the Yuntai Mountain, labelled from 11 to nn. However, only two of them 阅读全文
posted @ 2017-08-19 09:17 joeylee97 阅读(200) 评论(0) 推荐(0) 编辑
摘要:Given a sequence A with length n,count how many quadruple (a,b,c,d) satisfies: a≠b≠c≠d,1≤a<b≤n,1≤c<d≤n,Aa<Ab,Ac>Ada≠b≠c≠d,1≤a<b≤n,1≤c<d≤n,Aa<Ab,Ac>Ad. 阅读全文
posted @ 2017-08-19 09:16 joeylee97 阅读(128) 评论(0) 推荐(0) 编辑
摘要:直接打表找规律 HazelFan is given two positive integers a,ba,b, and he wants to calculate amodbamodb. But now he forgets the value of bb and only remember the 阅读全文
posted @ 2017-08-19 09:12 joeylee97 阅读(121) 评论(0) 推荐(0) 编辑
摘要:春天到了, HDU校园里开满了花, 姹紫嫣红, 非常美丽. 葱头是个爱花的人, 看着校花校草竞相开放, 漫步校园, 心情也变得舒畅. 为了多看看这迷人的校园, 葱头决定, 每次上课都走不同的路线去教室, 但是由于时间问题, 每次只能经过k个地方, 比方说, 这次葱头决定经过2个地方, 那他可以先去问 阅读全文
posted @ 2017-08-19 09:10 joeylee97 阅读(324) 评论(0) 推荐(0) 编辑
摘要:Give you a tree with N vertices and N‐ 1 edges, and then ask you Q queries on “which vertex is Y's son that has the smallest number and which vertex i 阅读全文
posted @ 2017-08-16 19:00 joeylee97 阅读(263) 评论(0) 推荐(0) 编辑
摘要:适用于t[]串长度较小的情况,利用位运算一般比KMP算法快两倍以上。 用D来记录前缀的匹配情况,要使用Shift 算法,需要一个辅助表B。B 是一个字典,key 是问题域字符集中的每个字符,value 是一个n 位无符号整数,记录该字符在模式串T 的哪些位置出现。 由于D【j】表示的是T[0..J] 阅读全文
posted @ 2017-08-16 14:47 joeylee97 阅读(503) 评论(0) 推荐(0) 编辑
摘要:The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, eac 阅读全文
posted @ 2017-08-14 09:54 joeylee97 阅读(143) 评论(0) 推荐(0) 编辑
摘要:The binomial coefficient C(m, n) is defined as C(m, n) = m! (m − n)! n! Given four natural numbers p, q, r, and s, compute the the result of dividing 阅读全文
posted @ 2017-08-13 21:12 joeylee97 阅读(209) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/176767#overview A - A Spy in the Metro B 最长递增子序列变形 C D E G H I I 树形DP 阅读全文
posted @ 2017-08-13 16:16 joeylee97 阅读(277) 评论(0) 推荐(0) 编辑
摘要:3657 括号序列 我们用以下规则定义一个合法的括号序列: (1)空序列是合法的 (2)假如S是一个合法的序列,则 (S) 和[S]都是合法的 (3)假如A 和 B 都是合法的,那么AB和BA也是合法的 例如以下是合法的括号序列: (), [], (()), ([]), ()[], ()[()] 以 阅读全文
posted @ 2017-08-12 16:56 joeylee97 阅读(1145) 评论(0) 推荐(0) 编辑
摘要:3049 舞蹈家怀特先生 时间限制: 1 s 空间限制: 64000 KB 题目等级 : 黄金 Gold 题解 3049 舞蹈家怀特先生 3049 舞蹈家怀特先生 时间限制: 1 s 空间限制: 64000 KB 题目等级 : 黄金 Gold 时间限制: 1 s 空间限制: 64000 KB 题目等 阅读全文
posted @ 2017-08-12 16:21 joeylee97 阅读(249) 评论(0) 推荐(0) 编辑
摘要:分数规划问题,是指这样一类问题: 要求f(x)/g(x)的最值,其中f(x),g(x)都是线性函数,而其中被研究的最多的是0-1分数规划,即求这样的一个式子的极值 r=(∑(ci*xi))/(∑(di*xi)),其中xi∈{0,1} 我们可以把这个式子变换一下 z=(∑(ci*xi))-r'*(∑( 阅读全文
posted @ 2017-08-12 11:09 joeylee97 阅读(149) 评论(0) 推荐(0) 编辑
摘要:In the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feature to his image retrie 阅读全文
posted @ 2017-08-12 10:04 joeylee97 阅读(651) 评论(0) 推荐(0) 编辑
摘要:These are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should b 阅读全文
posted @ 2017-08-11 08:59 joeylee97 阅读(134) 评论(0) 推荐(0) 编辑
摘要:Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 115624 Accepted: 35897 Case Time Limit: 2000MS Description You have N integers, A1, A2, .. 阅读全文
posted @ 2017-08-10 15:32 joeylee97 阅读(191) 评论(0) 推荐(0) 编辑
摘要:Just a Hook In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecut 阅读全文
posted @ 2017-08-10 14:00 joeylee97 阅读(213) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include #include #include #include #include using namespace std; typedef long long LL; #define MAXN 50009 #define N 25 #define INF 0x3f3f3f3f int t, n, a[MAXN]; struct nod... 阅读全文
posted @ 2017-08-10 11:07 joeylee97 阅读(152) 评论(0) 推荐(0) 编辑
摘要:Each of Farmer John's N cows (1 ≤ N ≤ 1,000) produces milk at a different positive rate, and FJ would like to order his cows according to these rates 阅读全文
posted @ 2017-08-09 19:21 joeylee97 阅读(414) 评论(0) 推荐(0) 编辑
摘要:Stockbroker Grapevine Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 37069 Accepted: 20612 Description Stockbrokers are known to overreact 阅读全文
posted @ 2017-08-09 18:36 joeylee97 阅读(176) 评论(0) 推荐(0) 编辑
摘要:Problem Description 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 阅读全文
posted @ 2017-08-09 16:36 joeylee97 阅读(191) 评论(0) 推荐(0) 编辑
摘要:为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请你写个程序确认一下是否 阅读全文
posted @ 2017-08-08 16:45 joeylee97 阅读(140) 评论(0) 推荐(0) 编辑
摘要:SPF Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9317 Accepted: 4218 Description Consider the two networks shown below. Assuming that da 阅读全文
posted @ 2017-08-08 15:33 joeylee97 阅读(162) 评论(0) 推荐(0) 编辑
摘要:time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Palindromic characteristics of string s  阅读全文
posted @ 2017-08-08 11:47 joeylee97 阅读(269) 评论(0) 推荐(0) 编辑
摘要:time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output time limit per test 2 seconds time limit 阅读全文
posted @ 2017-08-08 11:15 joeylee97 阅读(394) 评论(0) 推荐(0) 编辑
摘要:Given a sequence of integers, a1, a2, . . . , an, we define its sign matrix S such that, for 1 ≤ i ≤ j ≤ n, Sij = “ + ” if ai + . . . + aj > 0; Sij = 阅读全文
posted @ 2017-08-07 20:29 joeylee97 阅读(220) 评论(0) 推荐(0) 编辑
摘要:Problem Description Holedox is a small animal which can be considered as one point. It lives in a straight pipe whose length is L. Holedox can only mo 阅读全文
posted @ 2017-08-05 10:49 joeylee97 阅读(249) 评论(0) 推荐(0) 编辑
摘要:Problem Description Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing 阅读全文
posted @ 2017-08-04 21:18 joeylee97 阅读(164) 评论(0) 推荐(0) 编辑
摘要:When playing DotA with god-like rivals and pig-like team members, you have to face an embarrassing situation: All your teammates are killed, and you h 阅读全文
posted @ 2017-08-04 17:11 joeylee97 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Problem Description Harry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwarts school is in holiday, Harry P 阅读全文
posted @ 2017-08-04 10:49 joeylee97 阅读(338) 评论(0) 推荐(0) 编辑
摘要:time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output time limit per test 2 seconds time limit 阅读全文
posted @ 2017-08-03 20:56 joeylee97 阅读(245) 评论(0) 推荐(0) 编辑
摘要:You are given a sequence of n integers a1, a2, ..., an. Determine a real number x such that the weakness of the sequence a1 - x, a2 - x, ..., an - x i 阅读全文
posted @ 2017-08-03 19:50 joeylee97 阅读(299) 评论(0) 推荐(0) 编辑
摘要:memory limit per test 512 megabytes input standard input output standard output memory limit per test 512 megabytes memory limit per test input standa 阅读全文
posted @ 2017-08-03 19:26 joeylee97 阅读(164) 评论(0) 推荐(0) 编辑
摘要:The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D 阅读全文
posted @ 2017-08-02 16:51 joeylee97 阅读(132) 评论(0) 推荐(0) 编辑
摘要:C. Hexadecimal's Numbers time limit per test 1 second memory limit per test 64 megabytes input standard input output standard output One beautiful Jul 阅读全文
posted @ 2017-08-02 15:26 joeylee97 阅读(212) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2017-08-02 15:24 joeylee97 阅读(235) 评论(0) 推荐(0) 编辑
摘要:Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 8109 Accepted: 3551 Special Judge Description Bessie's been appointed the new watch-cow for 阅读全文
posted @ 2017-08-01 16:22 joeylee97 阅读(272) 评论(0) 推荐(0) 编辑
摘要:Bellman_ford算法用于寻找正环或者负环! 算法导论: 24.1 The Bellman-Ford algorithm The Bellman-Ford algorithm solves the single-source shortest-paths problem in the gene 阅读全文
posted @ 2017-08-01 12:46 joeylee97 阅读(171) 评论(0) 推荐(0) 编辑
摘要:Description Consider the following 5 picture frames placed on an 9 x 8 array. ........ ........ ........ ........ .CCC.... EEEEEE.. ........ ........ 阅读全文
posted @ 2017-08-01 10:47 joeylee97 阅读(196) 评论(0) 推荐(0) 编辑
摘要:An Arc of Dream is a curve defined by following function: where a 0 = A0 a i = a i-1*AX+AY b 0 = B0 b i = b i-1*BX+BY What is the value of AoD(N) modu 阅读全文
posted @ 2017-08-01 08:56 joeylee97 阅读(187) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示