- 博客(12)
- 收藏
- 关注
原创 阶乘因式分解(一)
描述 给定两个数m,n,其中m是一个素数。 将n(0 输入第一行是一个整数s(0 随后的s行, 每行有两个整数n,m。 输出输出m的个数。 样例输入 2 100 5 16 2 样例输出 24 15 #include #include #include #include #include #include #include #includ
2014-03-26 21:02:28 659
原创 管闲事的小明
描述某校大门外长度为L的马路上有一排树,每两棵相邻的树之间的间隔都是1米。我们可以把马路看成一个数轴,马路的一端在数轴0的位置,另一端在L的位置;数轴上的每个整数点,即0,1,2,……,L,都种有一棵树。 由于马路上有一些区域要用来建地铁。这些区域用它们在数轴上的起始点和终止点表示。 已知任一区域的起始点和终止点的坐标都是整数,区域之间可能有重合的部分。现在要把这些区域中的树(包括区域端点
2014-03-26 20:38:56 613
原创 求转置矩阵问题
描述 求一个三行三列的转置矩阵。 输入第一行一个整数n 每组测试数据是九个整型数(每个数都不大于10000),分别为矩阵的的每项; 输出每组测试数据的转置矩阵; 请在每组输出之后加一个换行#include #include #include #include #include #include #include #include #include #include #
2014-03-26 20:17:42 594
原创 ASCII码排序
描述 输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符。 输入第一行输入一个数N,表示有N组测试数据。后面的N行输入多组数据,每组输入数据都是占一行,有三个字符组成,之间无空格。 输出对于每组输入数据,输出一行,字符中间用一个空格分开。 样例输入 3 qwe asd zxc 样例输出 e q w a d s c x z #i
2014-03-21 11:39:45 585
原创 素数求和问题
描述现在给你N个数(0输入第一行给出整数M(0<M<10)代表多少组测试数据 每组测试数据第一行给你N,代表该组测试数据的数量。 接下来的N个数为要测试的数据,每个数小于1000输出每组测试数据结果占一行,输出给出的测试数据的所有素数和样例输入3 5 1 2 3 4 5 8 11 12 13 14 15 16 17 18 10 21 22 23 24 25 26 27 28 29 30 样
2014-03-21 11:37:24 494
原创 Phone List
Description Given 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: 1. Emergency 911
2014-03-12 20:34:16 648
原创 Copying DNA
Description Evolution is a seemingly random process which works in a way which resembles certain approaches we use to get approximate solutions to hard combinatorial problems. You are now to do som
2014-03-12 20:27:22 598
原创 Shopaholic
Description Lindsay is a shopaholic. Whenever there is a discount of the kind where you can buy three items and only pay for two, she goes completely mad and feels a need to buy all items in the st
2014-03-12 20:12:50 735
原创 Optimal Parking
Description When shopping on Long Street, Michael usually parks his car at some random location, and then walks to the stores he needs. Can you help Michael choose a place to park which minimises
2014-03-12 18:54:23 663
原创 I Love This Game
Description Do you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It include several parts , such as passing , shooting
2014-03-05 20:45:46 764
原创 Secret Number
Description 有一天, KIKI 收到一张奇怪的信, 信上要KIKI 计算出给定数各个位上数字为偶数的和. eg. 5548 结果为12 , 等于 4 + 8 KIKI 很苦恼. 想请你帮忙解决这个问题. Input 输入数据有多组,每组占一行,只有一个数字,保证数字在INT范围内. Output 对于每
2014-03-05 20:43:49 1041
原创 Just a Numble
Description Now give you two integers n m, you just tell me the m-th number after radix point in 1/n,for example n=4,the first numble after point is 2,the second is 5,and all 0 followed
2014-03-05 20:41:15 770
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人