Integer Numbers Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on ZJU. Original ID: 336564-bit integer IO format: %lld Java class name: Main Special Judge The boy likes numbers. He has a sheet of paper. He have written a…
ZOJ Problem Set - 3365 Integer Numbers Time Limit: 1 Second Memory Limit: 32768 KB Special Judge The boy likes numbers. He has a sheet of paper. He have written a sequence of consecutive integer numbers on the sheet. The boy likes them. But…
Binary Numbers Time Limit: 2 Seconds Memory Limit: 65536 KB Given a positive integer n, print out the positions of all 1's in its binary representation. The position of the least significant bit is 0. Example The positions of 1's in the binary r…
A Fibonacci sequence is calculated by adding the previous two members of the sequence, with the first two members being both 1. f(1) = 1, f(2) = 1, f(n > 2) = f(n - 1) + f(n - 2) Your task is to take a number as input, and print that Fibonacci number…
Burning Bridges Time Limit: 5 Seconds Memory Limit: 32768 KB Ferry Kingdom is a nice little country located on N islands that are connected by M bridges. All bridges are very beautiful and are loved by everyone in the kingdom. Of course, the system o…
题目连接:problemId=542" target="_blank">ZOJ 1542 POJ 1861 Network 网络 Network Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Andrew is working as system administrator and is planning to establish a new network in his com…
ZOJ 3529 - A Game Between Alice and Bob Time Limit:5000MS Memory Limit:262144KB 64bit IO Format:%lld & %llu Description Alice and Bob play the following game. A series of numbers is written on the blackboard. Alice and Bob take turns choosing…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1859 Matrix Searching Time Limit: 10 Seconds Memory Limit: 32768 KB Given an n*n matrix A, whose entries Ai,j are integer numbers ( 1 <= i <= n, 1 <= j <= n ). An operation FIND t…
A Game Between Alice and Bob Time Limit: 5 Seconds Memory Limit: 262144 KB Alice and Bob play the following game. A series of numbers is written on the blackboard. Alice and Bob take turns choosing one of the numbers, and replace it with one of…
Let us consider undirected graph G = which has N vertices and M edges. Incidence matrix of this graph is N * M matrix A = {a ij}, such that a ij is 1 if i-th vertex is one of the ends of j-th edge and 0 in the other case. Your task is to find the sum…
ZOJ Problem Set - 2676 Network Wars Time Limit: 5 Seconds Memory Limit: 32768 KB Special Judge Network of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and can transmit data in both direction…
Network Wars Time Limit: 5 Seconds Memory Limit: 32768 KB Special Judge Network of Byteland consists of n servers, connected by m optical cables. Each cable connects two servers and can transmit data in both directions. Two servers of the n…
Beer Problem Time Limit: 2 Seconds Memory Limit: 32768 KB Everyone knows that World Finals of ACM ICPC 2004 were held in Prague. Besides its greatest architecture and culture, Prague is world famous for its beer. Though drinking too much is prob…
B - Cryptography Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%lld & %llu Submit Status Practice ZOJ 2671 Description Young cryptoanalyst Georgie is planning to break the new cipher invented by his friend Andie. To do this, he must…
Crossed Matchings Time Limit: 2 Seconds Memory Limit: 65536 KB There are two rows of positive integer numbers. We can draw one line segment between any two equal numbers, with values r, if one of them is located in the first row and the other on…
How Many Shortest Path Time Limit: 10 Seconds Memory Limit: 32768 KB Given a weighted directed graph, we define the shortest path as the path who has the smallest length among all the path connecting the source vertex to the target vertex. And i…
Matrix Searching Time Limit: 10 Seconds Memory Limit: 32768 KB Given an n*n matrix A, whose entries Ai,j are integer numbers ( 1 <= i <= n, 1 <= j <= n ). An operation FIND the minimun number in a given ssub-matrix. Input The first line o…
Description There are two rows of positive integer numbers. We can draw one line segment between any two equal numbers, with values r, if one of them is located in the first row and the other one is located in the second row. We call this line segmen…
题 Description Jerry is caught by Tom. He was penned up in one room with a door, which only can be opened by its code. The code is the answer of the sum of the sequence of number written on the door. The type of the sequence of number is 1^m + 2^m + 3…
Sheldon Numbers 题目链接: http://acm.hust.edu.cn/vjudge/contest/127406#problem/H Description According to Sheldon Cooper, the best number is 73. In his own words, "The best number is 73. 73 is the 21st prime number. Its mirror, 37, is the 12th, and its m…
A. Extract Numbers Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/600/problem/A Description You are given string s. Let's call word any largest sequence of consecutive symbols without symbols ',' (comma) and ';' (semicolon…
Mondriaan's Dream Problem Description Squares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was…
Missile Time Limit: 2 Seconds Memory Limit: 65536 KB You control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the same time. Before the launching, every missile need T1 seconds…
Burning Bridges Time Limit: 5 Seconds Memory Limit: 32768 KB Ferry Kingdom is a nice little country located on N islands that are connected by M bridges. All bridges are very beautiful and are loved by everyone in the kingdom. Of course, the sys…
Walking Ant Time Limit: 2 Seconds Memory Limit: 65536 KB Ants are quite diligent. They sometimes build their nests beneath flagstones. Here, an ant is walking in a rectangular area tiled with square flagstones, seeking the only hole leading to h…