摘要:#include<stdio.h>#include<algorithm>#include<iostream>#include<string.h>#include<math.h>using namespace std;const int MAXN=50;int a[MAXN][MAXN];//增广矩阵int x[MAXN];//解集bool free_x[MAXN];//标记是否是不确定的变元/*void Debug(void){ int i, j; for (i = 0; i < equ; i++) { for (j = 0;
阅读全文
摘要:SETITime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 1148Accepted: 691DescriptionFor some years, quite a lot of work has been put into listening to electromagnetic radio signals received from space, in order to understand what civilizations in distant galaxies might be trying to tell us. One
阅读全文
摘要:The ClocksTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12403Accepted: 4908Description|-------| |-------| |-------|| | | | | | ||---O | |---O | | O || | | | | ||-------| |-------| |-------| A B ...
阅读全文
摘要:Widget FactoryTime Limit: 7000MSMemory Limit: 65536KTotal Submissions: 3412Accepted: 1114DescriptionThe widget factory produces several different kinds of widgets. Each widget is carefully built by a skilled widgeteer. The time required to build a widget depends on its type: the simple widgets need
阅读全文
摘要:The Water BowlsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3340Accepted: 1298DescriptionThe cows have a line of 20 water bowls from which they drink. The bowls can be either right-side-up (properly oriented to serve refreshing cool water) or upside-down (a position which holds no water)
阅读全文
摘要:开关问题Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4016Accepted: 1399Description有N个相同的开关,每个开关都与某些开关有着联系,每当你打开或者关闭某个开关的时候,其他的与此开关相关联的开关也会相应地发生变化,即这些相联系的开关的状态如果原来为开就变为关,如果为关就变为开。你的目标是经过若干次开关操作后使得最后N个开关达到一个特定的状态。对于任意一个开关,最多只能进行一次开关操作。你的任务是,计算有多少种可以达到指定状态的方法。(不计开关操作的顺序)Input输入第一行有一个数K,表示以下有K组测
阅读全文
摘要:Flip GameTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 20103Accepted: 8710DescriptionFlip game is played on a rectangular 4x4 field with tw...
阅读全文
摘要:Painter's ProblemTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 3441Accepted: 1696DescriptionThere is a square wall which is made of n*n small square bricks. Some bricks are white while some bricks are yellow. Bob is a painter and he wants to paint all the bricks yellow. But there is s
阅读全文
摘要:EXTENDED LIGHTS OUTTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 4669Accepted: 3073DescriptionIn an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5 buttons each). Each button has a light. When a button is pressed, that
阅读全文
摘要:Round NumbersTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 6051Accepted: 2050DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other name
阅读全文
摘要:Wine Trading in GergoviaTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2765Accepted: 1245DescriptionAs you may know from the comic “Asterix and the Chieftain’s Shield”, Gergovia consists of one street, and every inhabitant of the city is a wine salesman. You wonder how this economy works?
阅读全文
摘要:Minimum CostTime Limit: 4000MSMemory Limit: 65536KTotal Submissions: 10978Accepted: 3692DescriptionDearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale area there are N shopkeepers (marked from 1 to N) which stocks goods from him.Dearboy has M supply places (ma
阅读全文
摘要:Going HomeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13994Accepted: 7167DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little man, you need to p
阅读全文
摘要:A Plug for UNIXTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 11636Accepted: 3834DescriptionYou are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow of information and
阅读全文
摘要:DiningTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 6586Accepted: 3015DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others.Farmer John has cooked fabulous meals for his cows, but he forgot to check his menu against
阅读全文
摘要:ACM Computer FactoryTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4077Accepted: 1366Special JudgeDescriptionAs you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is why all these computers are historically produced at the
阅读全文
摘要:Power NetworkTime Limit: 2000MSMemory Limit: 32768KTotal Submissions: 18309Accepted: 9643DescriptionA power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0
阅读全文
摘要:Treasure ExplorationTime Limit: 6000MSMemory Limit: 65536KTotal Submissions: 5480Accepted: 2154DescriptionHave you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experiences, you would neve
阅读全文
摘要:Guardian of DecencyTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 4071Accepted: 1702DescriptionFrank N. Stein is a very conservative high-sc...
阅读全文
摘要:Going HomeTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 13981Accepted: 7156DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little man, you need to p
阅读全文