摘要: Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irrever 阅读全文
posted @ 2019-11-10 13:31 Anticlock 阅读(137) 评论(0) 推荐(0) 编辑
摘要: A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time 阅读全文
posted @ 2019-11-10 13:07 Anticlock 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now y 阅读全文
posted @ 2019-11-09 21:43 Anticlock 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline 阅读全文
posted @ 2019-11-09 20:25 Anticlock 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 题目描述 繁繁想和小伙伴们打游戏,游戏在一个山庄进行,这个山庄有N座山,编号为1到N,为了方便大家在不同的山之间移动,繁繁建了一些桥,由于技术的原因,桥连接的两座山的高度差不能超过d,现在已知这些桥,求这个山庄最高的山和最低的山差距最大是多少?数据保证所有山之间都是联通的。 输入 第一个一个数T,表 阅读全文
posted @ 2019-11-05 00:02 Anticlock 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在一次考试之后,作为班主任的T老师需要给n个学生改卷子,T老师有个习惯,就是按学号的先后来看卷子,所以T老师每次看卷子之前都需要给卷子排好先后次序再改。 但是因为T老师的空闲时间很短,所以他想尽量把这个排序的任务分成多次来做。因此他请你将卷子分成一小叠一小叠的(但不打乱卷子现有顺序),使得 阅读全文
posted @ 2019-11-04 21:48 Anticlock 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 题目描述 繁繁有一个双向队列,队列里有数字1-N这N个数字,繁繁每次可以从队列中任意拿出一个数字,将其放在队列的头部或者队列的尾部,不停这样操作,直到队列变成升序,求最小操作次数。 输入 第一行一个数字N(N<=50000) 接下来N行,每行一个数字 输出 一个数表示最小操作次数 样例输入 5 2 阅读全文
posted @ 2019-11-04 21:43 Anticlock 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 描述 求两个不超过200位的非负整数的积。 输入 有两行,每行是一个不超过200位的非负整数,没有多余的前导0。 输出 一行,即相乘后的结果。结果里不能有多余的前导0,即如果结果是342,那么就不能输出为0342。 样例输入 12345678900 98765432100 样例输出 12193263 阅读全文
posted @ 2019-11-03 17:56 Anticlock 阅读(1183) 评论(0) 推荐(1) 编辑
摘要: 头文件 #include<fstream> 打开 ofstream fin; //写入文件 fin.open("in.txt"); ifstream fin; //从文件中读取 fin.open(""); 基本操作 fin.eof() //到达文件结尾 inf.clear(); inf.seekg( 阅读全文
posted @ 2019-11-02 15:41 Anticlock 阅读(121) 评论(0) 推荐(0) 编辑
摘要: sjtu4252 函数值 题目描述 有nn个开口向上的二次函数fi(x)=aix2+bix+cifi(x)=aix2+bix+ci 我们现在只考虑xx是整数的情况,对于每个整数xx用这nn个函数作用之都能得到nn个数,即使数值相同我们也认为是重复的多个 将xx取遍所有整数,在得到的无穷多个数中,求最 阅读全文
posted @ 2019-10-31 21:56 Anticlock 阅读(538) 评论(0) 推荐(0) 编辑