链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1813...
分类:
其他好文 时间:
2014-06-20 12:41:45
阅读次数:
189
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1808
Description
小胖子最近喜欢上了画画,但是他的画画技术很差,只能从零开始,小胖子在一条线上画了很多彩色的球,但是觉得不好看,就想修改。
小胖子站在画前想了又想,他有时会将一些连续的点涂成相同的颜色。但他感觉累...
分类:
其他好文 时间:
2014-06-20 11:13:08
阅读次数:
255
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2113
Description
Given a number of strings, can you find how many strings that appears T times?
Input
The input conta...
分类:
编程语言 时间:
2014-06-20 09:00:14
阅读次数:
344
链接:http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2040
Description:
给出一棵二叉树的中序和前序遍历,输出它的后序遍历。
Input
本题有多组数据,输入处理到文件结束。
每组数据的第一行包括一个整数n,表示这棵二叉树一共有n个节点。
接下来的一行每行包括n个整数,表示...
分类:
其他好文 时间:
2014-06-03 03:10:46
阅读次数:
236
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2116
Description
Wind and his GF(game friend) are playing a small game. They use the computer to randomly generated a nu...
分类:
其他好文 时间:
2014-06-03 02:17:13
阅读次数:
252
SOl:将原题改为枚举N的每一对因子,计算其是否互素即可。
#include
#include
#include
using namespace std;
inline int gcd(int a,int b)
{
return b==0?a:gcd(b,a%b);
}
int main()
{
int n,T,i,j;
scanf("%d",&T);
while(T...
分类:
其他好文 时间:
2014-05-21 07:07:00
阅读次数:
273
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1963
Description:
SunShine喜欢写日记,她把她的日记用TXT文件都保存在电脑里。每月一号和十六号,她都会新建一个TXT文件,然后接下来半个月,她都会在这个日记本里写。(为了方便,我们假设每个月都是30天)。今天是元旦,...
分类:
其他好文 时间:
2014-05-13 09:26:03
阅读次数:
352
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1916
Description:
小w和小z想到了一个新游戏,在这个游戏中他们各有N个卡片。小w想去使用她的卡片去覆盖小z的卡片。
卡片A能覆盖卡片B的条件是卡片A的高不小于卡片B的高同时卡片A的宽不小于卡片B的宽。
现在请计算出小w的...
分类:
其他好文 时间:
2014-05-13 06:04:58
阅读次数:
247
链接:http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1039
Description
前段时间,某省发生干旱,B山区的居民缺乏生活用水,现在需要从A城市修一条通往B山区的路。假设有A城市通往B山区的路由m条连续的路段组成,现在将这m条路段承包给n个工程队(n ≤ m ...
分类:
其他好文 时间:
2014-05-11 02:35:40
阅读次数:
369
本文出自:http://blog.csdn.net/svitter
原题:http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1053
题意:完全背包不解释。。直接贴代码。。
#include
#include
#include
using namespace std;
#defi...
分类:
其他好文 时间:
2014-05-03 16:06:14
阅读次数:
324