
简单算法
TANG3223
这个作者很懒,什么都没留下…
展开
-
I - 扩展欧几里得! CodeForces - 7C
A line on the plane is described by an equationAx + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018to5·1018inclusive, or to find out that s...原创 2018-09-26 18:18:36 · 253 阅读 · 0 评论 -
V - Maximum GCD UVA - 11827
Given theNintegers, you have to find the maximum GCD(greatest common divisor) of every possible pair of these integers.InputThe first line of input is an integerN(1<N<100) that determines...原创 2018-09-02 21:34:47 · 266 阅读 · 0 评论 -
A - 深海探险 51Nod - 1535
很久很久以前的一天,一位美男子来到海边,海上狂风大作。美男子希望在海中找到美人鱼,但是很不幸他只找到了章鱼怪。然而,在世界的另一端,人们正在积极的收集怪物的行为信息,以便研制出强大的武器来对付章鱼怪。由于地震的多发,以及恶劣的天气,使得我们的卫星不能很好的定位怪物,从而不能很好的命中目标。第一次射击的分析结果会反映在一张由n个点和m条边组成的无向图上。现在让我们来确定这张图是不是可以被认...原创 2018-09-02 20:42:27 · 169 阅读 · 0 评论 -
G - Line CodeForces - 7C
A line on the plane is described by an equationAx + By + C = 0. You are to find any point on this line, whose coordinates are integer numbers from - 5·1018to5·1018inclusive, or to find out that su...原创 2018-09-02 20:30:53 · 182 阅读 · 0 评论 -
A - 二叉搜索树 HDU - 3791
判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。接下去一行是一个序列,序列长度小于10,包含(0~9)的数字,没有重复数字,根据这个序列可以构造出一颗二叉搜索树。接下去的n行有n个序列,每个序列格式跟第一个序列一样,请判断这两个序列是否能组成同一颗二叉搜索树。Output如果序列相同则...原创 2018-08-26 15:55:10 · 217 阅读 · 0 评论