摘要: 题面 Description The Brocard Erdös Straus conjecture is that for any integer n 2 , there are positive integers a ≤ b ≤ c ,so that : $$ {4\over n}={1\ove 阅读全文
posted @ 2019-03-22 10:08 Artoriax 阅读(422) 评论(0) 推荐(0) 编辑
摘要: 引入 前几天参加湖南多校的比赛,其中有这样一道题,需要使用高精度,同时需要排序,如果用c++实现的话,重载运算符很麻烦,于是直接学习了一发怎样用Java写大数,同时也算是学习Java基本常识了 题目 Description Today the Intergalactic Council of Peb 阅读全文
posted @ 2019-03-13 17:22 Artoriax 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/CodeForces 1132F 题面 Description You are given a string $s$ of length $n$ consisting of lowercase Latin letters. You ma 阅读全文
posted @ 2019-03-08 12:47 Artoriax 阅读(753) 评论(3) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/CodeForces 1132C 题面 Description You have a long fence which consists of $n$ sections. Unfortunately, it is not painted 阅读全文
posted @ 2019-03-08 12:37 Artoriax 阅读(543) 评论(0) 推荐(1) 编辑
摘要: 题目链接 https://vjudge.net/problem/CodeForces 1121C 题面 Description Vasya likes taking part in Codeforces contests. When a round is over, Vasya follows al 阅读全文
posted @ 2019-03-08 12:26 Artoriax 阅读(592) 评论(0) 推荐(0) 编辑
摘要: 简介 线段树是一种二叉搜索树,它从上至下逐步将一个大区间划分成一些更小的单元区间,每个区间对应线段树中的一个节点 树中的每个节点代表着一段区间[L,R],每个节点(除叶子节点)的左儿子代表的区间为[L,mid],右儿子则为[mid+1,r]。可以发现对于一个节点来说,左右儿子所代表的区间加起来正好为 阅读全文
posted @ 2019-03-02 19:22 Artoriax 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 解决通法 找出第i条线增加后会增加几个交点,则增加的面数就是交点数+1,根据递推公式求出通项公式,注意如果第i次增加的线不只一条,要单独考虑每一条线,比如每一次增加一组平行线,要分别算出这两条线可能产生的交点数 例题 HDU 2050 折线分割平面 题目链接 https://vjudge.net/p 阅读全文
posted @ 2019-02-16 17:56 Artoriax 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/CodeForces 455A 题面 Description Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. O 阅读全文
posted @ 2019-02-16 17:37 Artoriax 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/UVA 12627 题面 Description Piotr found a magical box in heaven. Its magic power is that if you place any red balloon ins 阅读全文
posted @ 2019-02-16 17:29 Artoriax 阅读(122) 评论(0) 推荐(0) 编辑
摘要: HDU 1207 汉诺塔II 题目链接 https://vjudge.net/problem/HDU 1207 题面 Description 经典的汉诺塔问题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子 阅读全文
posted @ 2019-02-15 22:13 Artoriax 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/CodeForces 999D 题面 Description You are given an array consisting of n integers a1,a2,…,an, and a positive integer m. I 阅读全文
posted @ 2019-02-15 17:41 Artoriax 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/CodeForces 1061D 题面 Description There are nn TV shows you want to watch. Suppose the whole time is split into equal pa 阅读全文
posted @ 2019-02-15 17:14 Artoriax 阅读(379) 评论(0) 推荐(1) 编辑
摘要: 题目链接 https://vjudge.net/problem/CodeForces 1061B 题面 Description You came to the exhibition and one exhibit has drawn your attention. It consists of nn 阅读全文
posted @ 2019-02-15 12:48 Artoriax 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/UVALive 7261 题面 Description Wei Qing (died 106 BC) was a military general of the Western Han dynasty whose campaigns a 阅读全文
posted @ 2019-02-14 22:58 Artoriax 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目链接 https://vjudge.net/problem/HDU 4990 题面 Description Read the program below carefully then answer the question. c++ pragma comment(linker, "/STACK: 阅读全文
posted @ 2019-02-14 18:28 Artoriax 阅读(191) 评论(0) 推荐(0) 编辑