高精度运算 不管是int还是double亦或者long long ,这些定义变量都有数据范围的一定限制,在计算位数超过十几位的数,也就是超过他们自身的数据范围时,不能采用现有类型进行计算,只能自己通过编写程序进行计算也就是高精度运算. 程序代码 #include<iostream> #include<cstring> using namespace std; int main() { char a1[205],b1[205];//数组用来存储两个相加的数 int a[205],b[…
Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers A and B. Output for each case, if A is equal to B, you should print "YES",…
A - Serval and Bus It is raining heavily. But this is the first day for Serval, who just became 3 years old, to go to the kindergarten. Unfortunately, he lives far from kindergarten, and his father is too busy to drive him there. The only choice for…
浅入动态规划 dynamic programming is a method for solving a complex problem by breaking it down into a collection of simpler subproblems. 最近进行动态规划的学习,看到了一个很好的例子,现在把它记录下来仅供自我知识梳理 1. 从一个生活问题谈起 作者:阮行止 先来看看生活中经常遇到的事吧--假设您是个土豪,身上带了足够的1.5.10.20.50.100元面值的钞票.现在您的目…