随笔分类 - C语言编程
摘要:Problem DescriptionSmall W gets two files. There are n integers in each file. Small W wants to know whether these two files are same. So he invites yo...
阅读全文
摘要:Problem DescriptionFor this problem, you will write a program that prints theNthlargest value in a fixed sized array of integers. To make things simpl...
阅读全文
摘要:Problem Description给定一系列2维平面点的坐标(x, y),其中x和y均为整数,要求用一个最小的长方形框将所有点框在内。长方形框的边分别平行于x和y坐标轴,点落在边上也算是被框在内。Input测试输入包含若干测试用例,每个测试用例由一系列坐标组成,每对坐标占一行,其中|x|和|y|...
阅读全文
摘要:Problem Description统计一个给定字符串中指定的字符出现的次数Input测试输入包含若干测试用例,每个测试用例包含2行,第1行为一个长度不超过5的字符串,第2行为一个长度不超过80的字符串。注意这里的字符串包含空格,即空格也可能是要求被统计的字符之一。当读到'#'时输入结束,相应的结...
阅读全文
摘要:Problem Description话说辽军与MCA相峙多年,终于在一个秋日的早晨爆发了一次大规模的冲突.情况是这样子的,当天上午,由耶律-Pacision领军的辽军忽然带领数万人马浩浩荡荡向MCA山杀来,而这时候驻扎在MCA防守前线的是久经沙场的老将纪哥.纪哥得知这个消息,立刻召集手下精英,前往...
阅读全文
摘要:Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean....
阅读全文
摘要:Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of ...
阅读全文
摘要:Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are t...
阅读全文
摘要:Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7)...
阅读全文
摘要:Problem DescriptionCalculate S(n).S(n)=13+23+33+......+n3.InputEach line will contain one integer N(1 // 运用数学公式:1^3 +2^3 +3^3 +……+n^3 =[n(n+1)/2]^2...
阅读全文
摘要:Problem DescriptionThis problem is also a A + B problem,but it has a little difference,you should determine does (a+b) could be divided with 86.For ex...
阅读全文
摘要:Problem Descriptionwe define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, ... f(Z) = 26, f(z) = -26;Give you a letter x and a number y , you should outpu...
阅读全文
摘要:Problem DescriptionThere are many lamps in a line. All of them are off at first. A series of operations are carried out on these lamps. On the i-th op...
阅读全文
摘要:Problem DescriptionGive you the width and height of the rectangle,darw it.InputInput contains a number of test cases.For each case ,there are two numb...
阅读全文
摘要:Problem DescriptionGive you a number on base ten,you should output it on base two.(0 2 3 int main(){ 4 int number; 5 char result[20]; 6 ...
阅读全文
摘要:Problem Description你活的不容易,我活的不容易,他活的也不容易。不过,如果你看了下面的故事,就会知道,有位老汉比你还不容易。重庆市郊黄泥板村的徐老汉(大号徐东海,简称XDH)这两年辛辛苦苦养了不少羊,到了今年夏天,由于众所周知的高温干旱,实在没办法解决牲畜的饮水问题,就决定把这些羊...
阅读全文
摘要:Problem Description有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法?Input输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1 2 3 int main(){ 4 int T; 5 ...
阅读全文
摘要:Problem Description古希腊数学家毕达哥拉斯在自然数研究中发现,220的所有真约数(即不是自身的约数)之和为:1+2+4+5+10+11+20+22+44+55+110=284。而284的所有真约数为1、2、4、71、 142,加起来恰好为220。人们对这样的数感到很惊奇,并称之为亲...
阅读全文
摘要:Problem Description“ 改革春风吹满地,不会AC没关系;实在不行回老家,还有一亩三分地。谢谢!(乐队奏乐)”话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里雾里,而且,还竟然来这么几句打油诗。好呀,老师的责任就是帮你解决问题,既然想种田,那就分你一块。这块田位...
阅读全文
摘要:Problem Description还记得中学时候学过的杨辉三角吗?具体的定义这里不再描述,你可以参考以下的图形:11 11 2 11 3 3 11 4 6 4 11 5 10 10 5 1Input输入数据包含多个测试实例,每个测试实例的输入只包含一个正整数n(1 //本来不会做的,但是编着...
阅读全文

浙公网安备 33010602011771号