上一页 1 2 3 4 5 6 7 8 ··· 49 下一页
摘要: Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that there is 阅读全文
posted @ 2019-07-28 11:32 black_hole6 阅读(306) 评论(0) 推荐(0)
摘要: 一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA". 给定若干字母和它们相应的个数,计算一共可以组成多少个不同的字符串. Input每组测试数据分两行,第一行为n(1<=n<=26),表示不同字母的个数,第二行为n个数A1,A2,...,An(1<=Ai<=12),表示每种字母 阅读全文
posted @ 2019-07-27 11:05 black_hole6 阅读(312) 评论(0) 推荐(0)
摘要: 五一到了,PKU-ACM队组织大家去登山观光,队员们发现山上一个有N个景点,并且决定按照顺序来浏览这些景点,即每次所浏览景点的编号都要大于前一个浏览景点的编号。同时队员们还有另一个登山习惯,就是不连续浏览海拔相同的两个景点,并且一旦开始下山,就不再向上走了。队员们希望在满足上面条件的同时,尽可能多的 阅读全文
posted @ 2019-07-27 09:29 black_hole6 阅读(246) 评论(0) 推荐(0)
摘要: Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only i 阅读全文
posted @ 2019-07-26 20:01 black_hole6 阅读(260) 评论(0) 推荐(0)
摘要: In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China and Beijing Olympics is to be a festival f 阅读全文
posted @ 2019-07-26 11:17 black_hole6 阅读(181) 评论(0) 推荐(0)
摘要: You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take them alternatively. Each pl 阅读全文
posted @ 2019-07-26 10:31 black_hole6 阅读(207) 评论(0) 推荐(0)
摘要: Diophantus of Alexandria was an Egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations where variables we 阅读全文
posted @ 2019-07-24 22:24 black_hole6 阅读(220) 评论(0) 推荐(0)
摘要: You've got a string s = s1s2... s|s| of length |s|, consisting of lowercase English letters. There also are q queries, each query is described by two 阅读全文
posted @ 2019-07-24 21:24 black_hole6 阅读(200) 评论(0) 推荐(0)
摘要: Problem Description One day, Y_UME got an integer N and an interesting program which is shown below:Y_UME wants to play with this program. Firstly, he 阅读全文
posted @ 2019-07-24 20:41 black_hole6 阅读(609) 评论(2) 推荐(0)
摘要: 题目描述 求关于xx的同余方程 a x \equiv 1 \pmod {b}ax≡1(modb) 的最小正整数解。 输入输出格式 输入格式: 一行,包含两个正整数 a,ba,b,用一个空格隔开。 输出格式: 一个正整数 x_0x0​,即最小正整数解。输入数据保证一定有解。 输入输出样例 输入样例#1 阅读全文
posted @ 2019-07-23 10:30 black_hole6 阅读(203) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 49 下一页