摘要:
Problem DescriptionIn the modern time, Search engine came into the life of everybody like Google, Baidu, etc.Wiskey also wants to bring this feature t... 阅读全文
摘要:
题解 题目1001 GT and sequence注意先特判000的情况:如果读入的数据有000,那么去掉所有的000且最后答案和000取一个max。剩下的正数显然全部乘起来比较优。对于负数的话,如果个数是奇数个我们就去掉绝对值最小的那一个,然后全部乘起来即可。1002 GT and numbers... 阅读全文
摘要:
Problem DescriptionYou are given two numbers NNN and MMM.Every step you can get a new NNN in the way that multiply NNN by a factor of NNN.Work out how... 阅读全文
摘要:
Problem DescriptionYou are given a sequence of NNN integers.You should choose some numbers(at least one),and make the product of them as big as possib... 阅读全文
摘要:
欧几里德算法欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。基本算法:设a=qb+r,其中a,b,q,r都是整数,则gcd(a,b)=gcd(b,r),即gcd(a,b)=gcd(b,a%b)。第一种证明: a可以表示成a = kb + r,则r = a mod b 假设d是a,b... 阅读全文