2017年11月7日
摘要:
题目链接:https://cn.vjudge.net/problem/UVA-136题意:如果一个数的因子只由2,3,5,组成,则这个数被称为丑数。按照惯例,1也被称为丑数。求第1500个丑数并·输出。这道题没有数据输入。思路:题意很简单,但一不小心就会超时。。。。。...
阅读全文
posted @ 2017-11-07 20:17
zitian246
阅读(91)
推荐(0)
2017年11月1日
摘要:
George took sticks of the same length and cut them randomly until all parts became at most 50 unitslong. Now he wants to return sticks...
阅读全文
posted @ 2017-11-01 21:03
zitian246
阅读(114)
推荐(0)
2017年10月24日
摘要:
n的阶乘后面有多少个0?6的阶乘 = 1*2*3*4*5*6 = 720,720后面有1个0。Input一个数N(1 int main(){ int n; scanf("%d",&n); long long int sum=0; if(n#in...
阅读全文
posted @ 2017-10-24 21:29
zitian246
阅读(207)
推荐(0)
2017年10月23日
摘要:
Do you know what is called ``Coprime Sequence''? That is a sequence consists of nnpositive integers, and the GCD (Greatest Common Divi...
阅读全文
posted @ 2017-10-23 19:05
zitian246
阅读(132)
推荐(0)
2017年10月21日
摘要:
AVL树平衡二叉树数据结构AVL树是最先发明的自平衡二叉查找算法,是平衡二叉树的一种。在AVL中任何节点的两个儿子子树的高度最大差别为1,所以它又被成为高度平衡树。查找、插入和删除在平均和最坏情况下都是O(log n)。增加和删除可能需要通过一次或多次树旋转来平衡这棵...
阅读全文
posted @ 2017-10-21 08:51
zitian246
阅读(258)
推荐(0)
2017年10月14日
摘要:
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to...
阅读全文
posted @ 2017-10-14 19:10
zitian246
阅读(145)
推荐(0)
2017年10月10日
摘要:
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the fi...
阅读全文
posted @ 2017-10-10 13:42
zitian246
阅读(123)
推荐(0)
2017年9月28日
摘要:
给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0#include#includeusing namespace std;...
阅读全文
posted @ 2017-09-28 19:53
zitian246
阅读(265)
推荐(0)
2017年9月26日
摘要:
在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。Input每行只有一个正整数N,N小于32768。Output对应每个输入,输出兑换方法数。Sample Input293412553Sample Output71883...
阅读全文
posted @ 2017-09-26 21:11
zitian246
阅读(127)
推荐(0)
摘要:
Speakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的...
阅读全文
posted @ 2017-09-26 21:06
zitian246
阅读(95)
推荐(0)