随笔分类 -  数学

摘要:Problem Description In computer science, a character is a letter, a digit, a punctuation mark or some other similar symbol. Since computers can only p 阅读全文
posted @ 2018-08-16 16:32 starry_sky 阅读(333) 评论(0) 推荐(0)
摘要:A 走格子 题目描述 在平面上有n*n大小的正方形,定义正方形左下角坐标是(1,1),右下角坐标是(n,1) 现在A君在左下角,他的初始方向是向右,他要在正方形内走m步 当A君碰到边界或者已经走过的格子时,他便会逆时针转90°继续走,直到走完m步。 现在给你两个整数n和m,请算出走完m步后A君的坐标 阅读全文
posted @ 2018-06-09 13:39 starry_sky 阅读(188) 评论(0) 推荐(0)
摘要:1100 斜率最大 1100 斜率最大 1100 斜率最大 平面上有N个点,任意2个点确定一条直线,求出所有这些直线中,斜率最大的那条直线所通过的两个点。 (点的编号为1-N,如果有多条直线斜率相等,则输出所有结果,按照点的X轴坐标排序,正序输出。数据中所有点的X轴坐标均不相等,且点坐标为随机。) 阅读全文
posted @ 2018-04-24 22:05 starry_sky 阅读(246) 评论(0) 推荐(0)
摘要:1098 最小方差 1098 最小方差 1098 最小方差 若x1,x2,x3......xn的平均数为k。 则方差s^2 = 1/n * [(x1-k)^2+(x2-k)^2+.......+(xn-k)^2] 。 方差即偏离平方的均值,称为标准差或均方差,方差描述波动程度。 给出M个数,从中找出 阅读全文
posted @ 2018-04-24 20:47 starry_sky 阅读(508) 评论(0) 推荐(0)
摘要:D. Almost Identity Permutations D. Almost Identity Permutations A permutation p of size n is an array such that every integer from 1 to n occurs exact 阅读全文
posted @ 2017-11-11 16:45 starry_sky 阅读(232) 评论(0) 推荐(0)
摘要:CaoHaha's staff Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Probl 阅读全文
posted @ 2017-08-19 17:45 starry_sky 阅读(318) 评论(0) 推荐(0)
摘要:斐波那契数列的定义如下: F(0) = 0 F(1) = 1 F(n) = F(n - 1) + F(n - 2) (n >= 2) (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, ...) 给出n,求F(n),由于结果很大,输出F(n) 阅读全文
posted @ 2017-07-22 10:28 starry_sky 阅读(355) 评论(0) 推荐(0)
摘要:B - Colorful Hats 题意:有n个颜色,第i个数字表示第i个颜色不同的数量,求输入的数据是否有矛盾。 一个数学题目,可惜推不出来。只能看大佬的了。 阅读全文
posted @ 2017-06-18 22:56 starry_sky 阅读(288) 评论(0) 推荐(0)
摘要:Success Rate You are an experienced Codeforces user. Today you found out that during your activity on Codeforces you have made y submissions, out of w 阅读全文
posted @ 2017-05-28 20:18 starry_sky 阅读(290) 评论(0) 推荐(0)