随笔分类 - OJ---ZOJ,POJ
摘要:Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on i
阅读全文
摘要:A new web-design studio, called SMART (Simply Masters of ART), employs two people. The first one is a web-designer and an executive director at the sa
阅读全文
摘要:A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools t
阅读全文
摘要:You are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn. Write a program that: reads the number of intervals, their end points a
阅读全文
摘要:Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 <=
阅读全文
摘要:You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number
阅读全文
摘要:Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares fo
阅读全文
摘要:Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate
阅读全文
摘要:There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and wants to
阅读全文
摘要:Yixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has just received a bad news which denotes that DxtNetwor
阅读全文
摘要:A game-board consists of N fields placed around a circle. Fields are successively numbered from1 to N clockwise. In some fields there may be obstacles
阅读全文
摘要:You are given a tree with N nodes. The tree’s nodes are numbered 1 through N and its edges are numbered 1 through N − 1. Each edge is associated with
阅读全文
摘要:After their royal wedding, Jiajia and Wind hid away in XX Village, to enjoy their ordinary happy life. People in XX Village lived in beautiful huts. T
阅读全文
摘要:Last years Chicago was full of gangster fights and strange murders. The chief of the police got really tired of all these crimes, and decided to arres
阅读全文
摘要:Give a tree with n vertices,each edge has a length(positive integer less than 1001).Define dist(u,v)=The min distance between node u and v. Give an in
阅读全文
摘要:In 0th day, there are n-1 people and 1 bloodsucker. Every day, two and only two of them meet. Nothing will happen if they are of the same species, tha
阅读全文
摘要:Background If thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and t
阅读全文
摘要:Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema
阅读全文
摘要:You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, ey
阅读全文