1.门牌制作 暴力即可 #include #include #include #include #include #include #include #define N 1 ...
»
ydcwp
2020-10-28
1.青蛙的约会 题目:http://poj.org/problem?id=1061 题解:(x+mt)%L==(y+nt)%L等价于x-y+(m-n)t=kL 因此我们整理一下:(m-n)t+kL=y-x a=m-n,b=L,c=y-x 在这里需要注意a的值不为负,如果为负,则a=-a,c=-c 然 ...
»
1.A sequence of numbers 题目:http://acm.hdu.edu.cn/showproblem.php?pid=3670 题解:这是一道隐藏的快速幂的模板题,从数据我们就可以知道。对该题进行分析,如何判别是等差or等比,通过比较a[2]-a[1]==a[3]-a[2]如果相 ...
»
1.Integer Inquiry 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1047 解法:一道求大数之和,我们利用java里的BigInteger就可以轻松的解决,不过需要注意下格式的问题,每输出一个就要空一行,最后一个不用 代码: impor ...
»
1.雷达设备 题目链接:https://www.acwing.com/problem/content/114/ 解决思路:我们所要找到的是雷达的最小数目,因此我们需