摘要:
原题:Description在选举问题中,总共有n个小团体,每个小团体拥有一定数量的选票数。如果其中m个小团体的票数和超过总票数的一半,则此组合为“获胜联盟”。n个团体可形成若干个获胜联盟。一个小团体要成为一个“关键加入者”的条件是:在其所在的获胜联盟中,如果缺少了这个小团体的加入,则此联盟不能成为... 阅读全文
摘要:
原题:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4673题目大意:求从不超过 N 的正整数当中选取 K 个不同的数字,组成和为 S 的方... 阅读全文
摘要:
原题:DescriptionAndrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing zeros and ones.Once he th... 阅读全文
摘要:
原题DescriptionThere is a piece of paper in front of Tom, its length and width are integer. Tom knows the area of this paper, he wants to know the minim... 阅读全文
摘要:
原题:Description给你一个高为n ,宽为m列的网格,计算出这个网格中有多少个矩形,下图为高为2,宽为4的网格.Input第一行输入一个t, 表示有t组数据,然后每行输入n,m,分别表示网格的高和宽 ( n #includeusing namespace std;int f[110][110... 阅读全文
摘要:
原题Description我们知道,在编程中,我们时常需要考虑到时间复杂度,特别是对于循环的部分。例如,如果代码中出现for(i=1;i#includeusing namespace std;int ch[2500][2500];int main(){ int i, j; for (i ... 阅读全文
摘要:
原题:DescriptionToday on a lecture about strings Gerald learned a new definition of string equivalency. Two stringsaandbof equal length are calledequiva... 阅读全文
摘要:
原题DescriptionA ring is composed of n (even number) circles as shown in diagram. Put natural numbersinto each circle separately, and the sum of numbers... 阅读全文
摘要:
原题:Given a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of the maximum positive product involving consecutive... 阅读全文
摘要:
原题:DescriptionWrite a program that finds and displays all pairs of 5-digit numbers that between them use the digits0through9once each, such that the f... 阅读全文