摘要:
GraphTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 950Accepted Submission(s): 505Problem DescriptionEveryone knows how to calculate the shortest path in a directed graph. In fact, the opposite problem is also easy. Given the length of shortest p 阅读全文
摘要:
Lucky NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1240Accepted Submission(s): 635Problem DescriptionTo Chinese people, 8 is a lucky number. Now your task is to judge if a number is lucky. We say a number is lucky if it’s a multiple of 8, 阅读全文
摘要:
Google MapTime Limit:2 Seconds Memory Limit:65536 KBGoogleMap is a useful tool and most of you should be familiar with it. As the best hacker in the world, Jack is planning to retrieve all the data on the GoogleMap server. But he soon gives up because the total amount of data exceeds 1000T bytes! Bu 阅读全文
摘要:
Code FormatterTime Limit: 2 Seconds Memory Limit: 65536 KBSome companies have special requirements for source code format, and it is also good for programmers to keep consistent code style. You are asked to write a simple code formatter for the company to help the poor programmers.The first thing yo 阅读全文
摘要:
Image TransformationTime Limit: 2 Seconds Memory Limit: 65536 KBThe image stored on a computer can be represented as a matrix of pixels. In the RGB (Red-Green-Blue) color system, a pixel can be described as a triplex integer numbers. That is, the color of a pixel is in the format "r g b" w 阅读全文
摘要:
Beautiful MeadowTime Limit: 2 Seconds Memory Limit: 65536 KB Tom has a meadow in his garden. He divides it into N * M squares. Initially all the squares were covered with grass. He mowed down the grass on some of the squares and thinks the meadow is beautiful if and... 阅读全文
摘要:
Fence RepairTime Limit:2000MSMemory Limit:65536KTotal Submissions:14054Accepted:4474DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN(1 ≤N≤ 20,000) planks of wood, each having some integer lengthLi(1 ≤Li≤ 50,000) uni 阅读全文
摘要:
SquaresTime Limit:3500MSMemory Limit:65536KTotal Submissions:11235Accepted:4096DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same polygon. It is not the 阅读全文
摘要:
Flavius Josephus ReloadedTime Limit:2000MSMemory Limit:65536KTotal Submissions:1728Accepted:651DescriptionFlavius Josephus once was trapped in a cave together with his comrade soldiers surrounded by Romans. All of Josephus’ fellow soldiers preferred not to surrender but to commit suicide. So they al 阅读全文
摘要:
EqsTime Limit:5000MSMemory Limit:65536KTotal Submissions:7827Accepted:3811DescriptionConsider equations having the following form: a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0 The coefficients are given integers from the interval [-50,50]. It is consider a solution a system (x1, x2, x3, x4, x5) that verifies 阅读全文