随笔分类 - 计算几何
摘要:题目链接:https://code.google.com/codejam/contest/4224486/Problem A.Mushroom Monster这题题意就是,有N个时间点,每个时间点,Kaylin可以吃掉一定数量的mushroom,Bartholomew可以放入任意数量的mushroo...
阅读全文
摘要:题目链接:http://hihocoder.com/contest/msbop2015qual/problemsA.2月29日首先为了方便处理可以分类一下把问题转化成第a年到第b年的闰年数量。然后如果要求fun(x)=1~x年中闰年的数量,容斥一下就是 (1~x中4的倍数) -(1~x中100的倍数...
阅读全文
摘要:OI/ACM中经常要用到小数来解决问题(概率、计算几何等),但是小数在计算机中的存储方式是浮点数而不是我们在作数学运算中的数,有精度的限制。 以下以GUN C++为准,其他语言(或编译器)也差不了多少。本文竞赛向。一、基础篇1、一般浮点数使用double,范围为大概为-10^308 ~ 10^...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4063DescriptionYou are playing a flying game.In the game, player controls an aircraft in a 2D-space.The...
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4573Problem Description Remember our childhood? A few naked children throw stones standing on the same...
阅读全文
摘要:题目链接:http://codeforces.com/contest/70/problem/DOnce a walrus professor Plato asked his programming students to perform the following practical task.Th...
阅读全文
摘要:Problem DescriptionJosh Lyman is a gifted painter. One of his great works is a glass painting. He creates some well-designed lines on one side of a thick and polygonal glass, and renders it by some special dyes. The most fantastic thing is that it can generate different meaningful paintings by rotat
阅读全文
摘要:DescriptionThe famous Ghost Busters team has decided to upgrade their Ectomobile (aka Ecto-1) with a powerful proton gun and an advanced targeting system. Egon has designed and built all the hardware which consists of ectoplasmic scanner and a proton gun that has two degrees of freedom and can autom
阅读全文
摘要:Problem Description Doctor D. are researching for a horrific weapon. The muzzle of the weapon is a circle. When it fires, rays form a cylinder that runs through the circle verticality in both side. If one cylinder of rays touch another, there will be an horrific explosion. Originally, all circles c.
阅读全文
摘要:DescriptionRecently in Farland, a country in Asia, a famous scientist Mr. Log Archeo has discovered ancient pyramids. But unlike those in Egypt and Central America, they have triangular (not rectangular) foundation. That is, they are tetrahedrons in mathematical sense. In order to find out some impo
阅读全文
摘要:DescriptionUpdog is watching a plane object with a telescope. The field of vision in the telescope can be described as a circle. The center is at the origin and the radius isR. The object can be seen as a simple polygon ofNvertexes. Updog wants to know the area of the part of the object that can be
阅读全文
摘要:DescriptionGiven one triangle and one circle in the plane. Your task is to calculate the common area of these two figures.InputThe input will contain several test cases. Each line of input describes a test case. Each test case consists of nine floating point numbers,x1,y1,x2,y2,x3,y3,x4,y4andr, wher
阅读全文
摘要:DescriptionYou are given N circles and expected to calculate the area of the union of the circles !InputThe first line is one integer n indicates the ...
阅读全文
摘要:Problem DescriptionIn the unimaginable popular DotA game, a hero Naga Siren, also known as Slithice, has a very powerful skill: Song of the Siren, Sli...
阅读全文
摘要:DescriptionStill remember those games we played in our childhood? Folding and cutting paper must be among the most popular ones. Clever children will always search for something new, even when they play games like cutting paper. Now, Carol, a smart girl, asks her brother Mike to solve a puzzle. Howe
阅读全文
摘要:DescriptionBessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bessie will make a tour of N (2 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int MAXN = 50010; 9 const doubl..
阅读全文
摘要:DescriptionFractals are really cool mathematical objects. They have a lot of interesting properties, often including:1. fine structure at arbitrarily small scales;2. self-similarity, i.e., magnified it looks like a copy of itself;3. a simple, recursive definition.Approximate fractals are found a lot
阅读全文
摘要:DescriptionTriathlon is an athletic contest consisting of three consecutive sections that should be completed as fast as possible as a whole. The first section is swimming, the second section is riding bicycle and the third one is running.The speed of each contestant in all three sections is known.
阅读全文
摘要:DescriptionThe children's game Hotter Colder is played as follows. Player A leaves the room while player B hides an object somewhere in the room. Player A re-enters at position (0,0) and then visits various other positions about the room. When player A visits a new position, player B announces &
阅读全文
摘要:DescriptionThe main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: “Where is the most distant point from the sea?” The answer to this question for Honshu was found in 1996. The most distant point is located in former Usuda Town, Na
阅读全文

浙公网安备 33010602011771号