摘要:Bit MagicTime Limit: 8 Seconds Memory Limit: 32768 KBYesterday, my teacher taught me about bit operators: and (&), or (|), xor (^). I generated a number table a[N], and wrote a program to calculate the matrix table b[N][N] using three kinds of bit operator. I thought my achievement would get tea
阅读全文
摘要:Eliminate the ConflictTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 740Accepted Submission(s): 301Problem DescriptionConflicts are everywhere in the world, from the young to the elderly, from families to countries. Conflicts cause quarrels, fight
阅读全文
摘要:Katu PuzzleTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5749Accepted: 2077DescriptionKatu Puzzle is presented as a directed graph G(V, E) with each edge e(a, b) labeled by a boolean operator op (one of AND, OR, XOR) and an integer c (0 ≤ c ≤ 1). One Katu is solvable if one can find each
阅读全文
摘要:WeddingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5880Accepted: 1802Special JudgeDescriptionUp to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end, opposite each other, and the bride wears an ela
阅读全文
摘要:Map LabelerTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 1023Accepted: 337DescriptionMap generation is a difficult task in cartography. A vital part of such task is automatic labeling of the cities in a map; where for each city there is text label to be attached to its location, so that n
阅读全文
摘要:Ikki's Story IV - Panda's TrickTime Limit: 1000MSMemory Limit: 131072KTotal Submissions: 6065Accepted: 2234Descriptionliympanda, one of Ikki’s friend, likes playing games with Ikki. Today after minesweeping with Ikki and winning so many times, he is tired of such easy games and wants to play
阅读全文
摘要:Peaceful CommissionTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 802Accepted Submission(s): 158Problem DescriptionThe Public Peace Commission should be legislated in Parliament of The Democratic Republic of Byteland according to The Very Importa
阅读全文
摘要:【2-SAT问题】现有一个由N个布尔值组成的序列A,给出一些限制关系,比如A[x]AND A[y]=0、A[x]OR A[y]OR A[z]=1等,要确定A[0..N-1]的值,使得其满足所有限制关系。这个称为SAT问题,特别的,若每种限制关系中最多只对两个元素进行限制,则称为2-SAT问题。由于在2-SAT问题中,最多只对两个元素进行限制,所以可能的限制关系共有11种:A[x]NOT A[x]A[x] AND A[y]A[x] AND NOT A[y]A[x] OR A[y]A[x] OR NOT A[y]NOT (A[x] AND A[y])NOT (A[x] OR A[y])A[x] X
阅读全文
摘要:Bomb GameTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2294Accepted Submission(s): 769Problem DescriptionRobbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N rounds in the game. At each
阅读全文