1150. 简单魔板 1150. 简单魔板ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB , Special Judge Description魔板由8个大小相同方块组成,分别用涂上不同颜色,用1到8的数字表示。其初始状态是1 2 3 48 7 6 5对魔板可进行三种基本操作:A操作(上下行互换):8 7 6 51 2
1190. Reduced ID Numbers 1190. Reduced ID NumbersConstraintsTime Limit: 2 secs, Memory Limit: 32 MB DescriptionT. Chur teaches various groups of students at university U. Every U-student has a unique Student Identif
1721. Gray code[Special judge] 1721. Gray code[Special judge] Total:2124Accepted:638Rating:2.7/5.0(12 votes)
1930. 排序 1930. 排序ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB Description我们都知道,在排序算法中需要进行多次比较。若比较的两个数Ai, Aj(iAj的话,则称作有效比较。给定一个有N个互异元素的整数序列,请使用选择排序对序列进行排序,并输出其有效比较次数。这里假设使用的是标准的排序算法,并且从下标小到大
1052. Candy Sharing Game 1052. Candy Sharing GameConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionA number of students sit in a circle facing their teacher in the center. Each student initially has an e
1194. Message Flood 1194. Message FloodConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionWell, how do you feel about mobile phone? Your answer would probably be something like that “It’s so convenie
1608. Digit Counting 1608. Digit CountingConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionTrung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of
2501. 算算式 2501. 算算式ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescription_gXX遇到一个麻烦的式子:S = n1 + n2 + n3 + ...... + nk,已知n、k,求S的值。因为_gXX数学很差,希望你能告诉他答案。但是由于他的数学实在太差了,所以你只需要告诉他S除以9901的余数即可。In
2503. 最长字符串 2503. 最长字符串ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescription要求你构造一个由字符’A’,’B’组成的字符串, 满足以下几个条件:1) A的个数2) B的个数3) 连续的A的个数不可以超过maxA.4) 连续的B的个数不可以超过maxB. 5) 这个字符串的长度最长.给你
4314. Coprime 4314. CoprimeConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionIn number theory, a branch of mathematics, two integers a and b are said to be coprime or relatively prime if the onl
3912. 计算星期几 3912. 计算星期几ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescription2011年1月1日是星期六. 输入2011年的一个日期,计算这一天是星期几.Input输入的第一行是一个正整数T,表示总共有T组数据.每组数据包括两个正整数m和d,表示输入日期为m月d日. 输入的日期保证合法.Output
2388. What's next? 2388. What's next?ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionAccording to Wikipedia, an arithmetic progression (AP) is a sequence of numbers such that the difference of any
2312. output “Good!“ 2312. output “Good!“ConstraintsTime Limit: 1 secs, Memory Limit: 0.29296875 MBDescriptionoutput "Good!"InputnothingOutput"Good!"Sample OutputGood!Hintif Pascal 140Kif C 28
3498. 分解质因数 3498. 分解质因数ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescription对于输入的整数n,将其分解成若干个素数的乘积.Input第一行是一个整数T,表示总共有T组数据.接下来的T行,每行有一个整数n(2).Output对于每行的整数n,按从小到大的顺序输出素因子,每个素因子后面有一个空格.
4186. Matrix Addition 4186. Matrix AdditionConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionGiven two n*n matrices, A and B, compute the sum C=A+B.InputThere are multiples test cases. Each case is:
3836. 计算组合数 3836. 计算组合数ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescription从n个不同物品中选出m个的选法总数用组合数C(n, m)来表示. 已知n和m,求C(n, m)的值.Input输入包含多组测试数据.输入的每行是两个整数n和m(0).m和n都为0时表示输入结束.Output输出的每
3835. 计算三角形的周长 3835. 计算三角形的周长ConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescription在平面直角坐标系中,给出三角形三个顶点的坐标,求三角形的周长.Input第一行是一个整数T,表示总共有T组数据.接下来的T行,每行有6个实数x1, y1, x2, y2, x3, y3,表示三角形三个顶点的坐标.Ou
3734. rawMo 3734. rawMoConstraintsTime Limit: 1 secs, Memory Limit: 256 MBInput22 1Output22给跪,希望后面看到这个题目的不要被坑。// Problem#: 3734// Submission#: 1984659// The source code is licensed under Cre