24h購物| | PChome| 登入
2014-04-18 22:56:27
2012-05-13 21:40:05

[UVA][最小覆蓋圓] 10005 - Packing polygons

Packing polygons Given a polygon of n points (not necessarily convex), your goal is to say whether there is a circle of a given a radius R that contains the polygon or not. Input The...

2012-05-13 21:28:23

[NPSC][2006 高中組][B.古力德] 最小覆蓋圓

#include <stdio.h>#include <math.h>#define eps 1e-8struct Point { float x, y;};float dist(Point &a, Point &b) { return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);}Point circle(Point &...

2012-05-13 16:44:09

[UVA][Math] 545 - Heads


HeadsThe probability of n heads in a row tossing a fair coin is 2-n InputThe first line of the input contains an integer r. Then r lines containing each one an integer number n. The valueof n is as fo...

2012-05-13 15:52:55

[UVA][二分圖] 11045 - My T-shirt suits me


My T-shirt suits me Our friend Victor participates as an instructor in an environmental volunteer program. His boss asked Victor to distribute N T-shirts to M volunteers, one T-shirt each vol...

2012-05-13 15:27:30

[UVA] 750 - 8 Queens Chess Problem


8 Queens Chess ProblemIn chess it is possible to place eight queens on the board so that no onequeen can be taken by any other. Write a program that will determine allsuch possible arrangements for ei...

2012-05-13 15:13:19

[UVA][dfs] 167 - The Sultan's Successors

The Sultan's Successors The Sultan of Nubia has no children, so she has decided that the country will be split into up to k separate parts on her death and each part will be inherited by whoever ...

2012-05-13 13:01:10

[UVA][外心座標] 190 - Circle Through Three Points


Circle Through Three PointsYour team is to write a program that, given the Cartesian coordinates of three points on a plane, will find the equation of the circle through them all. The three points wil...

2012-05-13 11:54:18

[UVA][Math] 10310 - Dog and Gopher

Problem KDog and GopherInput: standardinputOutput: standardoutputTime Limit: 1 second Memory Limit: 32 MBA large field has a gopher and adog. The dog wants to eat the gopher, while the gopher wants to...

2012-05-13 11:38:10

[UVA][二分圖最大匹配] 10080 - Gopher II


[UVAProblem A: Gopher II The gopher family, having averted the canine threat, must face a new predator. The are n gophers and m gopher holes, each at distinct (x, y) coordinates. A hawk a...

2012-05-13 10:51:35

[UVA] 11530 - SMS Typing

B SMS Typing Input: Standard Input Output: Standard Output Cell phones have become an essential part of modern life. In addition to making voi...

2012-05-13 09:02:31

[UVA][Math] 1264 - Binary Search Tree


A binary search tree is a binary tree. It may be empty. If it is not empty, it satisfies the following properties: (1)Every node has a key, and no two nodes have the same key. (2)The keys in a...

2012-05-13 08:26:55

[UVA][Math] 10338 - Mischievous Children

Problem CMischievous ChildrenInput: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBAdam’sparents put up a sign that says “CONGRATULATIONS”. The sign is so big thatexact...

2012-05-13 07:49:21

[UVA] 615 - Is It A Tree?


Is It A Tree?A tree is a well-known data structure that is either empty (null,void, nothing) oris a set of one or more nodes connected by directed edges betweennodes satisfying the following propertie...

2012-05-12 18:24:16

[UVA][Trie] 11362 - Phone List


A: Phone List Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let's say the phone catalogue listed these numbers: ...

2012-05-12 17:53:37

Segment Tree,二維線段樹版本,zkw式

[UVA] 11297 - Census#include <stdio.h>#include <string.h>#define max(x, y) ((x) > (y) ? (x) : (y))#define min(x, y) ((x) < (y) ? (x) : (y))struct subTree { int maxv, minv;};struct se...

第一頁      ‹上一頁       91 .  92 .  93 .  94 .  95 .  96 .  97 .  98 .  99 .  100 .      下一頁›      最末頁
«上十頁      第 95 / 142 頁 , 共 2116 筆       下十頁»      
TOP