自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

努力ing!~

编程

  • 博客(30)
  • 资源 (1)
  • 收藏
  • 关注

原创 C语言中关于内存那些事

C语言的程序内存布局,从高到低依次为:栈区、堆区、未初始化数据区、初始化数据区、代码区。 一、栈区 由编译器自动管理,无需程序员手工控制。存放函数的参数值、局部变量的值等。栈区内容从高地址到低地址分配,从低地址到高地址存取。

2014-06-17 22:58:28 712

原创 第三届蓝桥杯Java高职组决赛第四题

题目描述: 【编程题】(满分21分)     Excel是最常用的办公软件。每个单元格都有唯一的地址表示。比如:第12行第4列表示为:“D12”,第5行第255列表示为“IU5”。          事实上,Excel提供了两种地址表示方法,还有一种表示法叫做RC格式地址。 第12行第4列表示为:“R12C4”,第5行第255列表示为“R5C255”。     你

2013-07-04 22:08:37 1024

原创 第三届蓝桥杯Java高职组决赛第三题

题目描述: 某少年宫引进了一批机器人小车。可以接受预先输入的指令,按指令行动。小车的基本动作很简单,只有3种:左转(记为L),右转(记为R),向前走若干厘米(直接记数字)。 例如,我们可以对小车输入如下的指令: 15L10R5LRR10R20 则,小车先直行15厘米,左转,再走10厘米,再右转,... 不难看出,对于此指令串,小车又回到了出发地。 你的任务是

2013-07-03 16:15:52 1238

原创 第三届蓝桥杯Java高职组决赛第一题

题目描述: 看这个算式: ☆☆☆ + ☆☆☆ = ☆☆☆ 如果每个五角星代表 1 ~ 9 的不同的数字。 这个算式有多少种可能的正确填写方法? 173 + 286 = 459 295 + 173 = 468 173 + 295 = 468 183 + 492 = 675 以上都是正确的填写法! 注意: 1

2013-07-01 20:52:16 1329

转载 分割平面

(1) n条直线最多分平面问题        题目大致如:n条直线,最多可以把平面分为多少个区域。        析:可能你以前就见过这题目,这充其量是一道初中的思考题。但一个类型的题目还是从简单的入手,才容易发现规律。当有n-1条直线时,平面最多被分成了f(n-1)个区域。则第n条直线要是切成的区域数最多,就必须与每条直线相交且不能有同一交点。 这样就会得到n-1个交点。这些交点将第n条

2012-02-21 09:46:03 574

原创 HDU 2054 A == B ?

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2054   题意:给两个数,判断这两个数是否相等。没有范围没有填写规则   代码: 这个是自己写的很长 #include #include int main() { char s1[100000]; char s2[100000]; int t;

2012-02-20 15:15:25 2022

原创 HDU 2187 悼念512汶川大地震遇难同胞——老人是真饿了

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2187   类型:贪心   代码: #include #include struct cc { int p; int h; } d[1005]; int comp(void const *a,void const *b) { struct cc

2012-02-03 22:05:21 2481

原创 HDU 2108 Shape of HDU

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2108   题意: 逆时针的给出N个点的坐标,求所围成多边形是凹的还是凸的。   代码:   #include #include struct xy { int x; int y; }d[1000]; int g(int a,int b,int c)

2012-02-01 09:34:58 1579 1

原创 HDU 2037 今年暑假不AC

Problem Description “今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%...” 确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级

2012-01-25 15:44:42 844 1

原创 HDU 1862 EXCEL排序

Problem Description Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。     Input 测试输入包含若干测试用例。每个测试用例的第1行包含两个整数 N (<=100000) 和 C,其中 N 是纪录的条数,C 是指定排序的列号。以下有 N 行,每行包含一条学生纪录。每条学生纪录由学号(6位数字,同组测试中没有重复的学号)、姓名(不超过

2012-01-13 18:16:44 881

原创 HDU 2093 考试排名

Problem Description C++编程考试使用的实时提交系统,具有即时获得成绩排名的特点。它的功能是怎么实现的呢? 我们做好了题目的解答,提交之后,要么“AC”,要么错误,不管怎样错法,总是给你记上一笔,表明你曾经有过一次错误提交,因而当你一旦提交该题“AC”后,就要与你算一算帐了,总共该题错误提交了几回。虽然你在题数上,大步地跃上了一个台阶,但是在耗时上要摊上你共花去的时间。特别

2011-12-22 17:57:16 1406

原创 Climbing Worm

Problem Description An inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minute before climbing again. During the rest, i

2011-12-18 17:03:10 1375

原创 HDU 1061 Rightmost Digit

Problem Description Given a positive integer N, you should output the most right digit of N^N.     Input The input contains several test cases. The first line of the input is a single integer

2011-12-17 17:37:17 1592 2

原创 HDU 1048 The Hardest Problem Ever

Problem Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, he decided to create one of t

2011-12-17 14:19:24 584

原创 HDU 1029 Ignatius and the Princess IV

Problem Description "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and then N integers. There will be a special integer amo

2011-12-16 21:13:03 713

原创 HDU 1032 The 3n + 1 problem

Problem Description Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property o

2011-12-16 18:54:16 763

原创 简单的快速排序与二分查找

Time Limit:2 Sec  Memory Limit:64 MB Description 某天,有人给czyuan出了个难题(这个人是不是佳姐呢~): 给你N个数(0 Input 多组测试数据,每组测试数据第一行为N, Q。第二行N个数,以下Q行,每行一个数K。输入数据以N = Q = 0结束。 Output 每组数据输出Q行,如果K存在N个数中,则输出YES,否则输出NO

2011-12-10 16:07:34 942

原创 HDU 1279 验证角谷猜想

Problem Description 数论中有许多猜想尚未解决,其中有一个被称为“角谷猜想”的问题,该问题在五、六十年代的美国多个著名高校中曾风行一时,这个问题是这样描述的:任何一个大于一的自然数,如果是奇数,则乘以三再加一;如果是偶数,则除以二;得出的结果继续按照前面的规则进行运算,最后必定得到一。现在请你编写一个程序验证他的正确性。   Input 本题有多个测试数据组,第一行为测试

2011-12-05 11:23:28 1011

原创 HDU 1021 Fibonacci Again

Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).   Input Input consists of a sequence of lines, each containing an integer n

2011-12-03 18:43:48 696

原创 HDU 1020 Encoding

Problem Description Given a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k same characters should be encoded to "kX" where "X" i

2011-12-03 18:06:37 593

原创 HDU 1019 Least Common Multiple

Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 1

2011-12-01 17:03:13 589

原创 HDU 1017 A Mathematical Curiosity

Problem Description Given two integers n and m, count the number of pairs of integers (a,b) such that 0 This problem contains multiple test cases! The first line of a multiple input is an inte

2011-11-30 19:35:12 1762

原创 HDU 1013 Digital Roots

Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resultin

2011-11-29 11:37:59 619

原创 HDU 1012 u Calculate e

Problem Description A simple mathematical formula for e is where n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.

2011-11-29 07:40:02 612

原创 HDU 1008 Elevator

Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified

2011-11-28 16:55:02 449

原创 HDU 1004 Let the Balloon Rise

Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest i

2011-11-28 15:47:54 478

原创 HDU 1205 吃糖果

Problem Description HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。   Input 第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是

2011-11-26 14:28:05 966

原创 OJ需要知道的词

Queuing: 排队中,就是还没轮到你程序评测 Compiling : 正在编译你的程序 Running : 正在运行你的程序 Accepted (AC) : 你的代码通过了 Presentation Error (PE) : 格式错误,你的代码可能多(少)输出了空格,回车 Wrong Answer (WA) : 答案错误,你的代码生成的结果跟标准的不一样 Runtime Err

2011-11-25 17:53:43 457

原创 HDU 1412 {A}+{B}

Problem Description 给你两个集合,要求{A} + {B}. 注:同一个集合中不会有两个相同的元素. Input 每组输入数据分为三行,第一行有两个数字n,m(0 Output 针对每组数据输出一行数据,表示合并后的集合,要求从小到大输出,每个元素之间有一个空格隔开. Sample Input 1 2 1 2 3 1 2 1 1 2 Sam

2011-11-25 17:45:44 1784

原创 ACM初学笔记

1.求回文数 a=a*10+b%10;   b=b/10;     2.简便的将一串没有空格的数字赋给数组 scanf("%d",&n); a[i++]=n;     3.自动打字(在测试程序的时候不用一个一个的敲案例) freopen("in.txt","r",stdin); 输出到TXT文档里 freopen("out.txt", "w", stdout); 代码

2011-11-24 12:48:53 588 1

动态规划基础

动态规划入门的基础知识的PPT详细的讲解了动态规划的入门知识

2011-12-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除