![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
文章平均质量分 65
Prime me
Nobody can defeat me unless I don't want to win.
展开
-
A - Intersection
Problem DescriptionMatt is a big fan of logo design. Recently he falls in love with logo made up by rings. The following figures are some famous examples you may know.A ring is a 2-D figure bounded by two circles sharing the common center. The radius for原创 2021-08-17 20:03:08 · 58 阅读 · 0 评论 -
Grade Point Average
Grade Point Average链接:https://ac.nowcoder.com/acm/contest/16092/G来源:牛客网As soon as Moca entered the university last year as a freshman, she was told that the competition is fierce and everyone was desperately trying to improve their grades. As a result,原创 2021-05-11 14:31:51 · 708 阅读 · 0 评论 -
A. Strange Table
A. Strange Table题目:Polycarp found a rectangular table consisting of n rows and m columns. He noticed that each cell of the table has its number, obtained by the following algorithm “by columns”:cells are numbered starting from one;cells are numbered f原创 2021-03-28 09:14:06 · 207 阅读 · 0 评论 -
算法:汉诺塔
算法:汉诺塔题目Description汉诺塔(又称河内塔)问题是印度的一个古老的传说。开天辟地的神勃拉玛在一个庙里留下了三根金刚石的棒A、B和C,A上面套着n个圆的金片,最大的一个在底下,其余一个比一个小,依次叠上去,庙里的众僧不倦地把它们一个个地从A棒搬到C棒上,规定可利用中间的一根B棒作为帮助,但每次只能搬一个,而且大的不能放在小的上面。僧侣们搬得汗流满面,可惜当n很大时这辈子恐怕就很搬了 聪明的你还有计算机帮你完成,你能写一个程序帮助僧侣们完成这辈子的夙愿吗?Input输入金片的个数n。这里原创 2021-03-22 21:39:37 · 98 阅读 · 0 评论 -
Biorhythms
Biorhythms核心就是打表,找出最小周期,之后就减去初始值就是结果题目Some people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23,原创 2021-03-22 21:23:26 · 105 阅读 · 0 评论 -
最大公约数&& 最小公倍数
最大公约数## *** 最小公倍数***题目Description求两个正整数的最大公约数。Input输入数据含有不多于50对的数据,每对数据由两个正整数(0 < n1,n2 < 232)组成。Output对于每组数据n1和n1,计算最大公约数,每个计算结果应占单独一行。Sample Input6 5 18 12Sample Output16辗转相除法求最大公约数#include<stdio.h>int gcd(int a,int b){原创 2021-03-16 10:32:19 · 210 阅读 · 0 评论 -
Berland Crossword
本题主要考察点在于判断四个角的状态,也就是分别判断在四个角的十六种状态下,各个边上是否还有其他的空白能存放黑子(判断是否在合理范为内)原创 2021-03-15 21:50:40 · 129 阅读 · 0 评论 -
Dense Array
#Dense Array# 标题Polycarp calls an array dense if the greater of any two adjacent elements is not more than twice bigger than the smaller. More formally, for any (), this condition must be satisfied:For example, the arrays , and are dense. And the arra原创 2021-03-14 09:05:17 · 324 阅读 · 0 评论 -
Find Integer--费马大定理
Problem Descriptionpeople in USSS love math very much, and there is a famous math problem .give you two integers n,a,you are required to find 2 integers b,c such that an+bn=cn.Inputone line contains one integer T;(1≤T≤1000000)next T lines contains two原创 2020-11-23 21:09:28 · 107 阅读 · 0 评论