![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
枚举
文章平均质量分 77
CCloth
这个作者很懒,什么都没留下…
展开
-
[计算几何][找规律]迎风一刀斩 PTA L3-006
迎着一面矩形的大旗一刀斩下,如果你的刀够快的话,这笔直一刀可以切出两块多边形的残片。反过来说,如果有人拿着两块残片来吹牛,说这是自己迎风一刀斩落的,你能检查一下这是不是真的吗?注意摆在你面前的两个多边形可不一定是端端正正摆好的,它们可能被平移、被旋转(逆时针90度、180度、或270度),或者被(镜像)翻面。这里假设原始大旗的四边都与坐标轴是平行的。输入格式:输入第一行给出一个正整数N(≤20),随后给出N对多边形。每个多边形按下列格式给出:kx1y1⋯xkyk其中k(2&l原创 2022-03-26 09:16:12 · 714 阅读 · 4 评论 -
[枚举]是否完全二叉搜索树 PTA L3-010
将一系列给定数字顺序插入一个初始为空的二叉搜索树(定义为左子树键值大,右子树键值小),你需要判断最后的树是否一棵完全二叉树,并且给出其层序遍历的结果。输入格式:输入第一行给出一个不超过20的正整数N;第二行给出N个互不相同的正整数,其间以空格分隔。输出格式:将输入的N个正整数顺序插入一个初始为空的二叉搜索树。在第一行中输出结果树的层序遍历结果,数字间以1个空格分隔,行的首尾不得有多余空格。第二行输出YES,如果该树是完全二叉树;否则输出NO。样例1:">样例1:">输入样例1原创 2022-03-25 19:08:53 · 103 阅读 · 0 评论 -
[思维][解方程][枚举]Strange_Fractions 第46届icpc区域赛上海站D
题目描述Given a positive fraction p/q, you should find two positive integers a,b that p/q=a/b+b/a. If no such integers, report it.输入描述:The first line contains one integer T (1≤T≤10^5), denoting the number of test cases.For each test case:Input one原创 2022-03-02 14:12:00 · 523 阅读 · 0 评论 -
[线段判交]Treasure Hunt POJ1066
Archeologists from the Antiquities and Curios Museum (ACM) have flown to Egypt to examine the great pyramid of Key-Ops. Using state-of-the-art technology they are able to determine that the lower floor of the pyramid is constructed from a series of straigh原创 2021-10-26 11:29:32 · 72 阅读 · 0 评论 -
[暴力][线段判交]Pick-up sticks POJ2653
Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to find the top sticks, that is these sticks such that there is no stick on top of them. Stan has noticed that the last thr原创 2021-10-26 10:49:46 · 99 阅读 · 0 评论 -
[思维][枚举]Trapped in the Haybales S 洛谷P3124
题目描述Farmer John has received a shipment ofNNlarge hay bales(1 \le N \le 100,0001≤N≤100,000), and placed them at various locations along the roadconnecting the barn with his house. Each balejjhas a sizeS_jSjand adistinct positionP_jPjgivin...原创 2021-10-14 17:42:43 · 228 阅读 · 0 评论