随笔分类 -  数学

摘要:You are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide. We will call point a bad if there ar 阅读全文
posted @ 2017-09-06 09:41 樱花落舞 阅读(163) 评论(0) 推荐(0) 编辑
摘要:Arpa is taking a geometry exam. Here is the last problem of the exam. You are given three points a, b, c. Find a point and an angle such that if we ro 阅读全文
posted @ 2017-09-06 09:10 樱花落舞 阅读(189) 评论(0) 推荐(0) 编辑
摘要:A B Problem Statement You are given an integer sequence of length N, a1,a2,…,aN. For each 1≤i≤N, you have three choices: add 1 to ai, subtract 1 from  阅读全文
posted @ 2017-09-02 23:36 樱花落舞 阅读(1167) 评论(0) 推荐(0) 编辑
摘要:Connect the countless points with lines, till we reach the faraway yonder. There are n points on a coordinate plane, the i-th of which being (i, yi). 阅读全文
posted @ 2017-09-02 18:18 樱花落舞 阅读(233) 评论(0) 推荐(0) 编辑
摘要:题意:删除指定数字,求剩下数字的与或非值 解法:保存一下前缀和后缀 阅读全文
posted @ 2017-08-31 15:54 樱花落舞 阅读(258) 评论(0) 推荐(0) 编辑
摘要:解法:发现。。最多15个,那么。。暴力一下啦 阅读全文
posted @ 2017-08-31 15:50 樱花落舞 阅读(242) 评论(0) 推荐(0) 编辑
摘要:1001 求个绝对值比较大小喽 1002 把字符串出现的字母记录一下,然后遍历a-z,谁第一个没出现就输出谁 1003 Problem Statement We have N sticks with negligible thickness. The length of the i-th stick 阅读全文
posted @ 2017-08-20 23:43 樱花落舞 阅读(437) 评论(1) 推荐(1) 编辑
摘要:Problem Description 根据小学数学的知识,我们知道一个正整数x是3的倍数的条件是x每一位加起来的和是3的倍数。反之,如果一个数每一位加起来是3的倍数,则这个数肯定是3的倍数。现在给定进制P,求有多少个B满足P进制下,一个正整数是B的倍数的充分必要条件是每一位加起来的和是B的倍数。 阅读全文
posted @ 2017-08-17 00:13 樱花落舞 阅读(206) 评论(0) 推荐(0) 编辑
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=6129 题意:一次操作就是i从1~n有 A[i]=A[i]^A[i-1]^A[i-2]...^A[1] 那么这样操作m次会得到什么 解法: 我们先打一个表 5 10 1 2 3 4 5 1 3 0 4 1 1 2 阅读全文
posted @ 2017-08-17 00:08 樱花落舞 阅读(268) 评论(0) 推荐(0) 编辑
摘要:Description 当前正火的一款手游阴阳师又出新式神了,BugZhu十分想要获得新出的式神,所以他决定花光所有的积蓄来抽抽抽!BugZhu经过长时间的研究后发现通过画三角外接圆能够提高获得该式神的概率,即如下图所示的图形: 高超的数学天分给予了BugZhu神一般的洞察力,BugZhu还发现当图 阅读全文
posted @ 2017-08-14 18:03 樱花落舞 阅读(212) 评论(0) 推荐(0) 编辑
摘要:Description forever97和pikapikachu在玩一种画图游戏,两人相互往一个n*m大的矩形里画半径为r的圆,任意两圆不能相交,圆与矩形也不能相交,不能再画的人输。现在forever97先画,假设两人都足够聪明,均采取最佳策略,问最后谁会赢? Input 第一行一个正整数T(T< 阅读全文
posted @ 2017-08-14 18:03 樱花落舞 阅读(323) 评论(0) 推荐(0) 编辑
摘要:Description 由于某些原因菲莉丝拿到了贤者之石,所以好像变得很厉害了好像变得很厉害的菲莉丝想要炼成幻想乡,其中有一个原料是稗田一族对幻想乡历史的记录。现在菲莉丝拿到了一个被某只魔粘性精神体加密过的的卷轴。密文通过原文和一个正整数key加密形成,而key和密文又有一定关联。现给出密文,求ke 阅读全文
posted @ 2017-08-14 18:02 樱花落舞 阅读(199) 评论(0) 推荐(0) 编辑
摘要:Problem Description 今天是2017年8月6日,农历闰六月十五。 小度独自凭栏,望着一轮圆月,发出了“今夕何夕,见此良人”的寂寞感慨。 为了排遣郁结,它决定思考一个数学问题:接下来最近的哪一年里的同一个日子,和今天的星期数一样?比如今天是8月6日,星期日。下一个也是星期日的8月6日 阅读全文
posted @ 2017-08-12 17:04 樱花落舞 阅读(333) 评论(4) 推荐(0) 编辑
摘要:Problem Description 对于一个串S,当它同时满足如下条件时,它就是一个01偏串: 1、只由0和1两种符组成; 2、在S的每一个前缀中,0的个数不超过1的个数; 3、S中0的个数和1的个数相等。 现在给定01偏串S,请计算一下S在所有长度为n的01偏串中作为子串出现的次数的总和。 由 阅读全文
posted @ 2017-08-06 22:59 樱花落舞 阅读(420) 评论(0) 推荐(0) 编辑
摘要:This is an interactive problem. You should use flush operation after each printed line. For example, in C++ you should usefflush(stdout), in Java you 阅读全文
posted @ 2017-07-26 23:04 樱花落舞 阅读(227) 评论(0) 推荐(0) 编辑
摘要:Mahmoud has n line segments, the i-th of them has length ai. Ehab challenged him to use exactly 3 line segments to form a non-degenerate triangle. Mah 阅读全文
posted @ 2017-07-26 01:14 樱花落舞 阅读(150) 评论(0) 推荐(0) 编辑
摘要:Problem Description There is a youngster known for amateur propositions concerning several mathematical hard problems.Nowadays, he is preparing a thou 阅读全文
posted @ 2017-07-26 00:51 樱花落舞 阅读(140) 评论(0) 推荐(0) 编辑
摘要:Molly Hooper has n different kinds of chemicals arranged in a line. Each of the chemicals has an affection value, The i-th of them has affection value 阅读全文
posted @ 2017-07-23 00:27 樱花落舞 阅读(262) 评论(0) 推荐(0) 编辑
摘要:Sherlock has a new girlfriend (so unlike him!). Valentine's day is coming and he wants to gift her some jewelry. He bought n pieces of jewelry. The i- 阅读全文
posted @ 2017-07-23 00:17 樱花落舞 阅读(263) 评论(0) 推荐(0) 编辑
摘要:Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer points on the Cartesian 阅读全文
posted @ 2017-07-22 00:45 樱花落舞 阅读(231) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示