快速切题 sgu135. Drawing Lines】的更多相关文章

135. Drawing Lines time limit per test: 0.25 sec. memory limit per test: 4096 KB Little Johnny likes to draw a lot. A few days ago he painted lots of straight lines on his sheet of paper. Then he counted in how many zones the sheet of paper was split…
控制台程序. import javax.swing.JComponent; import java.util.*; import java.awt.*; import java.awt.geom.*; @SuppressWarnings("serial") public class SketcherView extends JComponent implements Observer { public SketcherView(Sketcher theApp) { this.theAp…
127. Telephone directory time limit per test: 0.25 sec. memory limit per test: 4096 KB CIA has decided to create a special telephone directory for its agents. The first 2 pages of the directory contain the name of the directory and instructions for a…
120. Archipelago time limit per test: 0.25 sec. memory limit per test: 4096 KB Archipelago Ber-Islands consists of N islands that are vertices of equiangular and equilateral N-gon. Islands are clockwise numerated. Coordinates of island N1 are (x1, y1…
117. Counting time limit per test: 0.25 sec. memory limit per test: 4096 KB Find amount of numbers for given sequence of integer numbers such that after raising them to the M-th power they will be divided by K. Input Input consists of two lines. Ther…
104. Little shop of flowers time limit per test: 0.25 sec. memory limit per test: 4096 KB PROBLEM You want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers, each being of a different kind, and at least a…
103. Traffic Lights Time limit per test: 0.25 second(s)Memory limit: 4096 kilobytes input: standardoutput: standard In the city of Dingilville the traffic is arranged in an unusual way. There are junctions and roads connecting the junctions. There is…
Pots Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10042   Accepted: 4221   Special Judge Description You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i)        f…
A Knight's Journey Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 31195   Accepted: 10668 Description Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey ar…
Sudoku Checker Time Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others) SubmitStatisticNext Problem Problem Description Sudoku is a popular single player game. The objective is to fill a 9x9 matrix with digits so that each colu…
Robot Motion Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10708   Accepted: 5192 Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in…
Crashing Robots Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7799   Accepted: 3388 Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destination…
Parencodings Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19716   Accepted: 11910 Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn…
坑!!!我还以为一个整数会截到两行!! Agri-Net Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 40056   Accepted: 16303 Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms…
感受到出题人深深的~恶意 这提醒人们以后...数字后面要用gets~不要getchar 此外..不要相信那个100? Borg Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8524   Accepted: 2872 Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant o…
136. Erasing Edges time limit per test: 0.25 sec. memory limit per test: 4096 KB Little Johnny painted on a sheet of paper a polygon with N vertices. Then, for every edge of the polygon, he drew the middle point of the edge. After that, he went to sc…
134. Centroid time limit per test: 0.25 sec. memory limit per test: 4096 KB You are given an undirected connected graph, with N vertices and N-1 edges (a tree). You must find the centroid(s) of the tree. In order to define the centroid, some integer…
133. Border time limit per test: 0.25 sec. memory limit per test: 4096 KB Along the border between states A and B there are N defence outposts. For every outpost k, the interval [Ak,Bk] which is guarded by it is known. Because of financial reasons, t…
Help Me with the Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3510   Accepted: 2251 Description Your task is to read a picture of a chessboard position and print it in the chess notation. Input The input consists of an ASCII-art…
487-3279 Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 247781   Accepted: 44015 Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phras…
Borg Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8905   Accepted: 2969 Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to descr…
Highways Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 23033   Accepted: 10612 Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Fl…
求N条直线最多能把一个平面分成几部分. 代码如下: ============================================================================================================================== #include<stdio.h> #include<algorithm> #include<string.h> #include<vector> usin…
水题,不说了. #include <iostream> using namespace std; int f[70000]={1}; int n; int main(){ cin>>n; for(int i=1;i<=n;i++) f[i]=f[i-1]+i; cout<<f[n]<<endl; }…
126. Boxes time limit per test: 0.25 sec. memory limit per test: 4096 KB There are two boxes. There are A balls in the first box, and B balls in the second box (0 < A + B < 2147483648). It is possible to move balls from one box to another. From one…
123. The sum time limit per test: 0.25 sec. memory limit per test: 4096 KB The Fibonacci sequence of numbers is known: F1 = 1; F2 = 1; Fn+1 = Fn + Fn-1, for n>1. You have to find S - the sum of the first K Fibonacci numbers. Input First line contains…
119. Magic Pairs time limit per test: 0.5 sec. memory limit per test: 4096 KB “Prove that for any integer X and Y if 5X+4Y is divided by 23 than 3X+7Y is divided by 23 too.” The task is from city Olympiad in mathematics in Saratov, Russia for schoolc…
118. Digital Root time limit per test: 0.25 sec. memory limit per test: 4096 KB Let f(n) be a sum of digits for positive integer n. If f(n) is one-digit number then it is a digital root for n and otherwise digital root of n is equal to digital root o…
116. Index of super-prime time limit per test: 0.25 sec. memory limit per test: 4096 KB Let P1, P2, … ,PN, … be a sequence of prime numbers. Super-prime number is such a prime number that its current number in prime numbers sequence is a prime number…
115. Calendar time limit per test: 0.25 sec. memory limit per test: 4096 KB First year of new millenium is gone away. In commemoration of it write a program that finds the name of the day of the week for any date in 2001. Input Input is a line with t…