04 2017 档案

摘要:Every year, Farmer John's N (1 <= N <= 20,000) cows attend "MooFest",a social gathering of cows from around the world. MooFest involves a variety of e 阅读全文
posted @ 2017-04-27 19:58 walfy 阅读(152) 评论(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-04-24 18:46 walfy 阅读(220) 评论(0) 推荐(0) 编辑
摘要:C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生 阅读全文
posted @ 2017-04-24 18:43 walfy 阅读(167) 评论(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-04-24 15:30 walfy 阅读(657) 评论(0) 推荐(1) 编辑
摘要:Signals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (that must be going th 阅读全文
posted @ 2017-04-23 23:35 walfy 阅读(136) 评论(0) 推荐(0) 编辑
摘要:King George has recently decided that he would like to have a new design for the royal graveyard. The graveyard must consist of several sections, each 阅读全文
posted @ 2017-04-23 15:58 walfy 阅读(385) 评论(0) 推荐(0) 编辑
摘要:Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive integ 阅读全文
posted @ 2017-04-23 15:15 walfy 阅读(117) 评论(0) 推荐(0) 编辑
摘要:A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Wri 阅读全文
posted @ 2017-04-23 14:20 walfy 阅读(120) 评论(0) 推荐(0) 编辑
摘要:Jessica's a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on it. If she 阅读全文
posted @ 2017-04-23 14:16 walfy 阅读(167) 评论(0) 推荐(0) 编辑
摘要:The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-an 阅读全文
posted @ 2017-04-22 21:57 walfy 阅读(109) 评论(0) 推荐(0) 编辑
摘要:传递闭包最开始是在Floyd-Warshall算法里面出现的,当时这算法用的很少就被我忽视了。。 传递闭包是指如果i能到达k,并且k能到达j,那么i就能到达j Have you ever read any book about treasure exploration? Have you ever 阅读全文
posted @ 2017-04-22 19:58 walfy 阅读(426) 评论(0) 推荐(0) 编辑
摘要:有向图的最小路径覆盖=V-二分图最大匹配。 Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that 阅读全文
posted @ 2017-04-22 19:30 walfy 阅读(801) 评论(0) 推荐(0) 编辑
摘要:最小定点覆盖是指这样一种情况: 图G的顶点覆盖是一个顶点集合V,使得G中的每一条边都接触V中的至少一个顶点。我们称集合V覆盖了G的边。最小顶点覆盖是用最少的顶点来覆盖所有的边。顶点覆盖数是最小顶点覆盖的大小。 相应地,图G的边覆盖是一个边集合E,使得G中的每一个顶点都接触E中的至少一条边。如果只说覆 阅读全文
posted @ 2017-04-22 18:59 walfy 阅读(2384) 评论(0) 推荐(0) 编辑
摘要:D. Mike and distribution time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike has always 阅读全文
posted @ 2017-04-22 17:51 walfy 阅读(322) 评论(0) 推荐(0) 编辑
摘要:C. Mike and gcd problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike has a seque 阅读全文
posted @ 2017-04-22 13:55 walfy 阅读(170) 评论(0) 推荐(0) 编辑
摘要:The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason 阅读全文
posted @ 2017-04-21 15:17 walfy 阅读(1311) 评论(0) 推荐(0) 编辑
摘要:Thanks to a certain "green" resources company, there is a new profitable industry of oil skimming. There are large slicks of crude oil floating in the 阅读全文
posted @ 2017-04-20 23:54 walfy 阅读(186) 评论(0) 推荐(0) 编辑
摘要:You’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm, sunny evening, and a soo 阅读全文
posted @ 2017-04-20 18:24 walfy 阅读(473) 评论(0) 推荐(0) 编辑
摘要:Given an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the diagonal entries 阅读全文
posted @ 2017-04-20 18:20 walfy 阅读(111) 评论(0) 推荐(0) 编辑
摘要:Judge Bahosain was bored at ACM AmrahCPC 2016 as the winner of the contest had the first rank from the second hour until the end of the contest. Bahos 阅读全文
posted @ 2017-04-19 22:41 walfy 阅读(222) 评论(0) 推荐(0) 编辑
摘要:小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更 阅读全文
posted @ 2017-04-19 11:45 walfy 阅读(130) 评论(0) 推荐(0) 编辑
摘要:There are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. Bu 阅读全文
posted @ 2017-04-18 23:05 walfy 阅读(180) 评论(0) 推荐(0) 编辑
摘要:onsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible 阅读全文
posted @ 2017-04-18 21:54 walfy 阅读(583) 评论(0) 推荐(0) 编辑
摘要:You are to write a program that has to decide whether a given line segment intersects a given rectangle. An example: line: start point: (4,9) end poin 阅读全文
posted @ 2017-04-10 14:58 walfy 阅读(448) 评论(0) 推荐(0) 编辑
摘要:Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top s 阅读全文
posted @ 2017-04-09 21:29 walfy 阅读(274) 评论(0) 推荐(0) 编辑
摘要:We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no in 阅读全文
posted @ 2017-04-08 18:47 walfy 阅读(464) 评论(0) 推荐(0) 编辑
摘要:Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on i 阅读全文
posted @ 2017-04-08 16:46 walfy 阅读(414) 评论(0) 推荐(0) 编辑
摘要:Mom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box to put 阅读全文
posted @ 2017-04-08 13:53 walfy 阅读(460) 评论(0) 推荐(0) 编辑
摘要:After retirement as contestant from WHU ACM Team, flymouse volunteered to do the odds and ends such as cleaning out the computer lab for training as e 阅读全文
posted @ 2017-04-06 14:14 walfy 阅读(242) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/contest/156688#problem/B 题目说了一大堆,前面的没有用,就是让你判断要加几条边才能强连通,用到缩点的知识 二重循环,判断邻接表下一个点是不是在强连通分量中,入度,出度分别保存下来,输出较大的那一个 阅读全文
posted @ 2017-04-01 14:33 walfy 阅读(177) 评论(0) 推荐(0) 编辑

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