摘要:
Yi Sima was one of the best counselors of Cao Cao. He likes to play a funny game himself. It looks like the modern Sudoku, but smaller. Actually, Yi S 阅读全文
摘要:
Alice and Bob is playing a game. Each of them has a number. Alice’s number is A, and Bob’s number is B. Each turn, one player can do one of the follow 阅读全文
摘要:
Frog FZU - 2272 Therearex frogs and y chicken in a garden. Kim found there are n heads and m legs in the garden. Please tell Kim how many frogs and ch 阅读全文
摘要:
阶乘除法 CSU - 1781 输入两个正整数 n, m,输出 n!/m!,其中阶乘定义为 n!= 1*2*3*...*n (n>=1)。 比如,若 n=6, m=3,则n!/m!=6!/3!=720/6=120。 是不是很简单?现在让我们把问题反过来:输入 k=n!/m!,找到这样的整数二元组(n 阅读全文
摘要:
You are given a sequence a1, a2, ..., an of one-dimensional segments numbered 1through n. Your task is to find two distinct indices i and j such that 阅读全文
摘要:
You might have heard about the next game in Lara Croft series coming out this year. You also might have watched its trailer. Though you definitely mis 阅读全文
摘要:
String can be called correct if it consists of characters "0" and "1" and there are no redundant leading zeroes. Here are some examples: "0", "10", "1 阅读全文
摘要:
1.改写comp从大到小排序。 运行结果: 233 113 23 13 3 什么会这样呢?比较时sort函数根据comp函数进行判断输的大小,系统默认 2.对结构体排序 比如ss结构体中a代表的是索引号,b代表的是索引对应的值,那么我想按索引排序,通过改写comp函数即可实现。 结果: 1 213 阅读全文