4105. Lines Counting Time Limit: 2.0 Seconds Memory Limit: 150000K Total Runs: 152 Accepted Runs: 47 On the number axis, there are N lines. The two endpoints L and R of each line are integer. Give you M queries, each query contains two interval…
链接:http://acm.tju.edu.cn/toj/showp4123.html 4123. Job Scheduling Time Limit: 1.0 Seconds Memory Limit: 65536K Total Runs: 130 Accepted Runs: 29 Given N jobs, each denoted by a 2-tuples integer (pi, ri) where pi is the processing time and ri is…
链接http://acm.tju.edu.cn/toj/showp4117.html 4117. Happy tree friends Time Limit: 1.0 Seconds Memory Limit: 65536K Total Runs: 164 Accepted Runs: 60 yuebai has an undirected complete graph with n vertices. He wants to know the minimum spanning tr…
链接:http://acm.tju.edu.cn/toj/showp4120.html 4120. Zombies VS Plants Time Limit: 1.0 Seconds Memory Limit: 65536K Total Runs: 268 Accepted Runs: 36 tmeteorj recently is interested in a game Plants VS Zombies like following picture. And his brain…
It's not Floyd Algorithm 时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte 描述 When a directed graph is given, we can solve its transitive closure easily using the well-known Floyd algorithm. But if you're given a transitive closure, can you give a…
Description Given N stations, you want to carry goods from station 1 to station N. Among these stations, we use M tubes to connect some of them. Each tube can directly connect K stations with each other. What is the minimum number of stations to pass…
Description As we all know caterpillars love to eat leaves. Usually, a caterpillar sits on leaf, eats as much of it as it can (or wants), then stretches out to its full length to reach a new leaf with its front end, and finally "hops" to it by c…
描述 Two companies cooperatively develop a project, but they don’t like working with one another. In order to keep the company together, they have decided that only one of them will work on each job. To keep things fair, the jobs need to be split so th…
描述 It is an interesting exercise to write a program to print out all permutations of 1, 2, …, n. However, since there are 6227020800 permutations of 1, 2, …, 13, it is unlikely that we would ever run this program on an input of size more than 10. How…
描述 A palindrome is a number that reads the same whether you read it from left to right or from right to left. Here is a surprising fact. Suppose we start with a number n. We reverse the digits of n and add it to n. If this number is a palindrome we s…
题目链接:http://acm.tju.edu.cn/toj/showp1706.html 很类似Poj的一道帮派的问题,记得找到的可疑的关系,不要将集合刷新就可以了. 1706. A Bug's Life Time Limit: 5.0 Seconds Memory Limit: 65536KTotal Runs: 1190 Accepted Runs: 360 Multiple test files Background Professor Hopper is resear…
4475: The Coolest Sub-matrix Time Limit(Common/Java):4000MS/12000MS Memory Limit:65536KByteTotal Submit: 50 Accepted:13 Description Given an N*N matrix, find the coolest square sub-matrix.We define the cool value of the square matrix…
2233. WTommy's Trouble Time Limit: 2.0 Seconds Memory Limit: 65536KTotal Runs: 1499 Accepted Runs: 437 As the captain, WTommy often has to inform all the TJU ACM team members of something important. But it will cost much time to inform all the…
Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be reached by moving backward and forward. In this prob…
191. The Worm Turns Time Limit: 1.0 Seconds Memory Limit: 65536K Total Runs: 5465 Accepted Runs: 1774 Worm is an old computer game. There are many versions, but all involve maneuvering a "worm" around the screen, trying to avoid running th…
The football foundation (FOFO) has been researching on soccer; they created a set of sensors to describe the ball behavior based on a grid uniformly distributed on the field. They found that they could predict the ball movements based on historical a…
RMQ with Shifts 时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte 描述 In the traditional RMQ (Range Minimum Query) problem, we have a static array A. Then for each query (L, R) (L<=R), we report the minimum value among A[L], A[L+1], …, A[R]. Note that…
以前的字符串题本来就弱..2年不写就更弱了.嗯.留作教训 God Le is the most talented ACMer in the TJU-ACM team. When he wants to open a file,he can just use his keyboard instead of using his mouse to click. Why he can do this?Because he uses the cmd.exe. There are many commands…