现在位置: 首页 > 算法 > 文章
2019年04月13日 算法 ⁄ 共 3187字 评论关闭
Ants Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4125   Accepted: 1258   Special Judge Description Young naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees. Each ant colony needs its own apple tree to feed itself. Bill has a map with coordinates of n ant colonies and n apple trees. He knows that ants travel from their...
阅读全文
2019年04月13日 算法 ⁄ 共 2151字 评论关闭
Cleaning Shifts Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9273   Accepted: 2473 Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has divided the day into T shifts (1 <= T <= 1,000,000), the first being shift 1 and...
阅读全文
2019年04月13日 算法 ⁄ 共 2919字 评论关闭
SPOJ Problem Set (classical) 417. The lazy programmer Problem code: LAZYPROG A new web-design studio, called SMART (Simply Masters of ART), employs two people. The first one is a web-designer and an executive director at the same time. The second one is a programmer. The director is so a nimble guy that the studio has already got N contracts for web site development. Each contract ...
阅读全文
2019年04月13日 算法 ⁄ 共 2337字 评论关闭
Protecting the Flowers Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 3528   Accepted: 1442 Description Farmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his beautiful flowers. Wanting to minimize the subsequent damage, FJ decid...
阅读全文
2019年04月13日 算法 ⁄ 共 2629字 评论关闭
Feel Good Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 8598   Accepted: 2324 Case Time Limit: 1000MS   Special Judge Description Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studying how good or bad days influent people's memories about some period of life.  A new idea Bill has recently developed a...
阅读全文
2019年04月13日 算法 ⁄ 共 1872字 评论关闭
4 Values whose Sum is 0 Time Limit: 15000MS   Memory Limit: 228000K Total Submissions: 14140   Accepted: 4002 Case Time Limit: 5000MS Description 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 are such that a + b + c + d = 0 . In the following, we assume that all lists have...
阅读全文
2019年04月13日 算法 ⁄ 共 2082字 评论关闭
Easy Finding Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 15668   Accepted: 4163 Description Given a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i < M, 0 ≤ j < N), could you find some rows that let every cloumn contains and only contains one 1. Input There are multiple cases ended by EOF. Test case up to 500.The first line of input is M, N (M ≤ 16, N ≤ 300). The next...
阅读全文
2019年04月13日 算法 ⁄ 共 2785字 评论关闭
Consecutive Blocks Time Limit: 2 Seconds      Memory Limit: 65536 KB There are N (1 ≤ N ≤ 105) colored blocks (numbered 1 to N from left to right) which are lined up in a row. And the i-th block's color is Ci (1 ≤ Ci ≤ 109). Now you can remove at most K (0 ≤ K ≤ N) blocks, then rearrange the blocks by their index from left to right. Please figure out the length of the largest consecutive bl...
阅读全文
2019年04月13日 算法 ⁄ 共 3135字 评论关闭
Problem Arrangement Time Limit: 2 Seconds      Memory Limit: 65536 KB The 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward is going to arrange the order of the problems. As we know, the arrangement will have a great effect on the result of the contest. For example, it will take more time to finish the first problem if the easiest problem hides ...
阅读全文
2019年04月12日 算法 ⁄ 共 3895字 评论关闭
Advanced Fruits Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1944   Accepted: 967   Special Judge Description The company "21st Century Fruits" has specialized in creating new sorts of fruits by transferring genes from one fruit into the genome of another one. Most times this method doesn't work, but sometimes, in very rare cases, a new fruit emerges that tastes...
阅读全文