上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 45 下一页
摘要: Statement of the Problem Several drawing applications allow us to draw polygons and almost all of them allow us to fill them with some color. The task 阅读全文
posted @ 2018-05-03 22:23 楼主好菜啊 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 题目大意:依次给定多个点(要求第一个点和最后一个点重叠),把前后两个点相连求最后得到的图形的面的个数 思路分析 : 借助欧拉定理,V+F-E = 2,只要求出点的数量和边的数量就可以计算出面的数量,点的数量只要枚举直线就可以,但是有可能有重复的点,之最去重一下就可以,然后在枚举剩下的点出现在几条直线 阅读全文
posted @ 2018-05-02 22:09 楼主好菜啊 阅读(1191) 评论(0) 推荐(0) 编辑
摘要: unique 函数是用来去除一个集合中重复元素的函数 若是在数组中,则调用此函数后,返回的除去重复元素的下一个指针的地方 若是在 vector中,则会返回重复元素下一个位置的迭代器,在调用erase函数,真正的删除 阅读全文
posted @ 2018-05-02 20:56 楼主好菜啊 阅读(881) 评论(0) 推荐(0) 编辑
摘要: 推荐博客 :https://blog.csdn.net/jjj19891128/article/details/22685605 https://blog.csdn.net/jq_develop/article/details/44981127 结构体的定义 点 直线 多边形 圆 整体一起 jls 阅读全文
posted @ 2018-05-02 19:02 楼主好菜啊 阅读(298) 评论(0) 推荐(0) 编辑
摘要: struct point { double x, y; point(double _x, double _y):x(_x), y(_y){} // 点-点=向量 point operator-(const point &v){ return point(x-v.x, y-v.y); } int dcmp(doub... 阅读全文
posted @ 2018-05-02 16:55 楼主好菜啊 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 链接:https://www.nowcoder.com/acm/contest/105/H来源:牛客网 题目描述 n个桶按顺序排列,我们用1~n给桶标号。有两种操作: 1 l r c 区间[l,r]中的每个桶中都放入一个颜色为c的球 (1≤l,r ≤n,l≤r,0≤c≤60) 2 l r 查询区间[ 阅读全文
posted @ 2018-05-01 08:08 楼主好菜啊 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 推荐博客 : https://blog.csdn.net/flushhip/article/details/80068888 百度文库 : https://wenku.baidu.com/view/dd6e9d00a58da0116d17491e.html 矩阵10大经典问题:http://www. 阅读全文
posted @ 2018-04-30 16:16 楼主好菜啊 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 链接:https://www.nowcoder.com/acm/contest/105/G来源:牛客网 题目描述 这是一个加强版的斐波那契数列。 给定递推式 求F(n)的值,由于这个值可能太大,请对109+7取模。 输入描述: 第一行是一个整数T(1 ≤ T ≤ 1000),表示样例的个数。以后每个 阅读全文
posted @ 2018-04-30 15:45 楼主好菜啊 阅读(162) 评论(0) 推荐(0) 编辑
摘要: In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are: 阅读全文
posted @ 2018-04-30 10:57 楼主好菜啊 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 权值线段树,每个叶子结点都视为点的权值,在进行操作时要离散 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 1. 插入x数 2. 删除x数(若有多个相同的数,因只删除一个) 3. 查询x数的排名(若有多个相同的数,因输出最小的排名) 4. 查询排名为x的数 5. 求x的 阅读全文
posted @ 2018-04-30 07:27 楼主好菜啊 阅读(745) 评论(0) 推荐(1) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 45 下一页