随笔分类 - ACM算法
摘要:You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to
阅读全文
摘要:During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of
阅读全文
摘要:In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate
阅读全文
摘要:Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For
阅读全文
摘要:N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each
阅读全文
摘要:N cities of the Java Kingdom need to be covered by radars for being in a state of war. Since the kingdom has M radar stations but only K operators, we
阅读全文
摘要:BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical commun
阅读全文
摘要:While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path tha
阅读全文
摘要:Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchang
阅读全文
摘要:One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total
阅读全文
摘要:Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whe
阅读全文
摘要:理解DLX算法之前首先了解精确覆盖问题和重复覆盖问题 精确覆盖问题 何为精确覆盖问题 在一个全集X中若干子集的集合为S,精确覆盖(Exactcover)是指,S的子集S*,满足X中的每一个元素在S*中恰好出现一次。 定义 满足以下条件的集合为一个精确覆盖: S*中任意两个集合没有交集,即X中的元素在
阅读全文
摘要:例题:FroggerPOJ - 2253 链接 https://vjudge.net/problem/POJ-2253 1. Floyd算法 算法思想:用mp[i][j]来表示i到j之间的距离,先对mp数组初始化,然后根据输入录入已知的i和j之间的距离,然后三重循环,第一重用k表示i和j之外的数,第
阅读全文
摘要:Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but
阅读全文
摘要:Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Be
阅读全文
摘要:The country of jiuye composed by N cites. Each city can be viewed as a point in a two- dimensional plane with integer coordinates (x,y). The distance
阅读全文
摘要:As we know,the fzu AekdyCoin is famous of math,especially in the field of number theory.So,many people call him "the descendant of Chen Jingrun",which
阅读全文
摘要:Today we play a squiggly sudoku, The objective is to fill a 9*9 grid with digits so that each column, each row, and each of the nine Connecting-sub-gr
阅读全文
摘要:A Sudoku grid is a 16x16 grid of cells grouped in sixteen 4x4 squares, where some cells are filled with letters from A to P (the first 16 capital lett
阅读全文
摘要:In the game of Sudoku, you are given a large 9 × 9 grid divided into smaller 3 × 3 subgrids. For example, . 2 7 3 8 . . 1 . . 1 . . . 6 7 3 5 . . . .
阅读全文

浙公网安备 33010602011771号