上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页
1084: [USACO 3.1.6]邮票Time Limit:1 SecMemory Limit:64 MBSubmit:122Solved:33SubmitStatusWeb BoardDescription已知一个 N 枚邮票的面值集合(如,{1 分,3 分})和一个上限 K —— 表示信封上能够贴 K 张邮票。计算从 1 到 M 的最大连续可贴出的邮资。 例如,假设有 1 分和 3 分的邮票;你最多可以贴 5 张邮票。很容易贴出 1 到 5 分的邮资(用 1 分邮票贴就行了),接下来的邮资也不难:6 = 3 + 37 = 3 + 3 + 18 = 3 + 3 + 1 + 19 = 3 Read More
posted @ 2013-05-03 20:02 free斩 Views(231) Comments(0) Diggs(0) Edit
CSUST 10811081: [USACO 2.3.4]货币系统Time Limit:1 SecMemory Limit:64 MBSubmit:142Solved:54SubmitStatusWeb BoardDescription母牛们不但创建了他们自己的政府而且选择了建立了自己的货币系统。 [In their own rebellious way],,他们对货币的数值感到好奇。传统地,一个货币系统是由1,5,10,20 或 25,50, 和 100的单位面值组成的。母牛想知道有多少种不同的方法来用货币系统中的货币来构造一个确定的数值。举例来说, 使用一个货币系统 {1,2,5,10,. Read More
posted @ 2013-05-03 18:40 free斩 Views(322) Comments(0) Diggs(0) Edit
如何在Eclipse中显示行号这个问题,困扰了我好长时间,今天终于找到了。其实很简单,经过以下几步,就一切搞定了:1)先打开一个类,如下图:2)然后打开视图,如何打开呢?最能解决问题的也就在此了:按Ctrl+F10,效果如下图:3)然后选择Show Line Numbers4)最后的效果如图:5)就这样简单,你就可以在编辑器中看到你的代码的行号了。其实最重要的是知道Ctrl+F10能打开视图菜单就一切搞定了。转载来自:http://www.blogjava.net/zhyiwww/archive/2006/10/27/77622.html Read More
posted @ 2013-05-02 20:08 free斩 Views(232) Comments(0) Diggs(0) Edit
转载来自:点击打开链接始终认为,对一个初学者来说,IT界的技术风潮是不可追赶。 我时常看见自己的DDMM们把课本扔了,去买些价格不菲的诸如C#, VB.Net 这样的大部头,这让我感到非常痛心。 而许多搞不清指针是咋回事的BBS站友眉飞色舞的讨论C#里面可以不用指针等等则让我觉得好笑。C#就象当年的ASP 一样,“忽如一夜春风来,千树万树梨花开”,结果许多学校的信息学院成了“Web 学院”。 96, 97级的不少大学生都去做Web了。当然我没有任何歧视某一行业的意识。 我只是觉得如果他们把追赶这些时髦技术的时间多花一点在基础的课程上应该是可以走得更远的。几个误区初学者对C#风潮的追赶其实也只是 Read More
posted @ 2013-05-01 15:37 free斩 Views(275) Comments(0) Diggs(0) Edit
5顺时针螺旋数:#include #include int map[25][25]; int main() { int n; while(scanf("%d", &n) != EOF) { memset(map, 0, sizeof(25)); int temp = 1; int x , y; int up = 1, down = n; int left = 1, right = n; while(temp = left; i--) { ... Read More
posted @ 2013-05-01 15:22 free斩 Views(153) Comments(0) Diggs(0) Edit
转载自:点击打开链接//第一期计算几何题的特点与做题要领:1.大部分不会很难,少部分题目思路很巧妙2.做计算几何题目,模板很重要,模板必须高度可靠。3.要注意代码的组织,因为计算几何的题目很容易上两百行代码,里面大部分是模板。如果代码一片混乱,那么会严重影响做题正确率。4.注意精度控制。5.能用整数的地方尽量用整数,要想到扩大数据的方法(扩大一倍,或扩大sqrt2)。因为整数不用考虑浮点误差,而且运算比浮点快。一。点,线,面,形基本关系,点积叉积的理解POJ 2318 TOYS(推荐)http://acm.pku.edu.cn/JudgeOnline/problem?id=2318POJ 23 Read More
posted @ 2013-04-29 17:20 free斩 Views(452) Comments(0) Diggs(0) Edit
比赛时一直错贴的叶找的代码:#include #include #include using namespace std; #define MAXN 10000 const int mod[20]={1,1,2,6,4,2,2,4,2,8,4,4,8,4,6,8,8,6,8,2};//列出钱20个的阶层最后一位 int ld(char* buf) { int len = strlen(buf), a[MAXN], i, c, ret = 1; if(len==1) return mod[buf[0]-'0'];//如果是个位数直接输出 for(i=0;... Read More
posted @ 2013-04-23 21:47 free斩 Views(159) Comments(0) Diggs(0) Edit
Wooden SticksProblem DescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, for the machine to prepare processing a stick. The setup Read More
posted @ 2013-04-20 20:19 free斩 Views(182) Comments(0) Diggs(0) Edit
Phone ListTime Limit:1000MSMemory Limit:65536KTotal Submissions:18122Accepted:5769DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let's say the phone catalogue listed these numbers:Emergency 911Alice 97 625 999Bob 91 1 Read More
posted @ 2013-04-18 19:39 free斩 Views(224) Comments(0) Diggs(0) Edit
RochambeauTime Limit:5000MSMemory Limit:65536KTotal Submissions:1603Accepted:556DescriptionNchildren are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it is possible that some group is empty). You don’t know who is Read More
posted @ 2013-04-14 16:08 free斩 Views(216) Comments(0) Diggs(0) Edit
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页