=======================
Problem B: Myacm Triangles
Source file: |
triangle.{c,cpp,java,pas} |
Input file: |
triangle.in |
Output file: |
triangle.out |
There has been considerable archeological work on the ancient Myacm culture. Many artifacts have been found in what have been called power fields: a fairly small area, less than 100 meters square where
there are from four to fifteen tall monuments with crystals on top. Such an area is mapped out above. Most of the artifacts discovered have come from inside a triangular area between just three of the monuments, now called the power triangle. After considerable
analysis archeologists agree how this triangle is selected from all the triangles with three monuments as vertices: it is the triangle with the largest possible area that does not contain any other monuments inside the triangle or on an edge of the triangle.
Each field contains only one such triangle.
Archeological teams are continuing to find more power fields. They would like to automate the task of locating the power triangles in power fields. Write a program that takes the positions of the monuments
in any number of power fields as input and determines the power triangle for each power field.
A useful formula: the area of a triangle with vertices (x1,y1), (x2,y2), and (x3,y3)
is the absolute value of
0.5 × [(y3-y1)(x2-x1)-(y2-y1)(x3-x1)].
For each power field there are several lines of data. The first line is the number of monuments: at least 4, and at most 15. For each monument there is a data line that starts with a one character label
for the monument and is followed by the coordinates of the monument, which are nonnegative integers less than 100. The first label is A, and the next is B, and so on.
There is at least one such power field described. The end of input is indicated by a 0 for the number of monuments. The first sample data below corresponds to the diagram in the problem.
For each power field there is one line of output. It contains the three labels of the vertices of the power triangle, listed in increasing alphabetical order, with no spaces.
Example input:
6
A 1 0
B 4 0
C 0 3
D 1 3
E 4 4
F 0 6
4
A 0 0
B 1 0
C 99 0
D 99 99
0
Example output:
BEF
BCD
=======================
相关推荐
行业教育软件-学习软件-Triangles Rectangles Solver 1.2 英文版.zip
一大批岛屿资产供您在下一Unity项目中使用!包括热带岛屿、火山岛、...岛屿:LOD 0:22k - 7k triangles,LOD 1:9k - 2k triangles,LOD 2:2000 - 600 triangles 船只:916-1238艘 村庄:16-164个 道具:116-374件
前端项目-triangles,Triangle background generator
NULL 博文链接:https://lengbingteng.iteye.com/blog/1769480
Sierpinski与C-Turtle作者:Jan Pearce撰写的Python版本杰西·W·沃克(Jesse W.Walker)转换为C ++参考: 此仓库使用Jesse W.Walker的
Velocity-Triangles-Kivy- 要求: Python版本3.7.1 库:Kivy == 1.11.1 kivymd == 0.104.1数学(包括Python)
var drawTriangles = require ( 'draw-triangles-2d' ) var path = [ [ 25 , 25 ] , [ 40 , 30 ] , [ 50 , 75 ] , [ 125 , 15 ] ] //get a thick polyline var mesh = require ( 'extrude-polyline' ) ( { ...
三角形网格元胞自动机和遗传算法的实验正在进行中的工作还不是很有趣去做打印高分显示顶部 DNA 序列
OpenGL-ES-2.0-基本三角形和着色器- 通过构建自己的Android程序来构建基本的旋转三角和着色器,开始对OpenGL ES的理解。 这是在我自己的时间里建立的,历时一周。 使用 (第1课)作为我的程序的基础,但全部都是从头...
matlab最简单的代码3D坐标中两个三角形之间的最小距离 一组函数,可以计算MATLAB中3D空间中两个三角形之间的最小距离。 三角形定义为1x9 MATLAB数组,编码为[x1,y1,z1, x2,y2,z2, x3,y3,z3] ,即每个顶点3个笛卡尔...
LoadShaders.cpp LoadShaders.o triangles triangles.frag triangles.vert LoadShaders.h Makefile triangles.cpp triangles.o 重新构建方法:make clean; make 运行方法:./triangles 另外,可以在同名博客网页...
js-三角形 带有 bdd 的 javascript
这是玩弄生成类似谢尔宾斯基垫圈的结果,部分用于数学课程项目。 用于计算三角形的方法相当简单: 如果采用具有 2^n^ 行的帕斯卡三角形并将偶数着色为白色,奇数为黑色,则结果是谢尔宾斯基三角形的近似值。...
魔术三角形 使用 Javascript 和 Canvas,尝试重新创建 。
我创建了这个迷你站点来练习 Javascript。... 该站点使用 JQuery 滑块来获得所需的谢尔宾斯基三角形复杂度级别,从 1(只有一个等边三角形)到 9 级深。 然后递归函数绘制分形图案。 基本情况是单个等边三角形,函数...
请阅读存储库中更新的自述文件: https://github.com/mattia-lecci/min-distance-3d-triangles#minimum-distance-between-two-triangles-in-3d-coordinates
triangles-no-2
SAC-COT_ Sample Consensus by Sampling Compatibility Triangles.pdf
simple script that construct triangles based on curve lines
2.Similar-Triangles是主要的相似三角形测距法,主要公式 d=Bf/abs(x2-x1),B为相机的平移向量模 ,f为相机焦距 头文件的形式以便用于程序引用 3.VedioCaptrue主要是用于左右相机同时截图以用于标定 4.data 为标定...