04 2017 档案
摘要:题目描述 小明同学要参加一场考试,考试一共有n道题目,小明必须作对至少60%的题目才能通过考试。考试结束后,小明估算出每题作对的概率,p1,p2,...,pn,你能帮他算出他通过考试的概率吗? 输入 输入第一行一个数n(1<=n<=100),表示题目的个数,第二行n个整数,p1,p2,...,pn,
阅读全文
摘要:题目链接 一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值。 例如:3*3的矩阵: -1 3 -1 2 -1 3 -3 1 2 和最大的子矩阵是: 3 -1 -1 3 1 2 一个M*N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出
阅读全文
摘要:题目链接 Problem Description MG is an intelligent boy. One day he was challenged by the famous master called Douer: if the sum of the square of every elem
阅读全文
摘要:题目链接 Problem Description MG is a rich boy. He has n apples, each has a value of V(0<=V<=9). A valid number does not contain a leading zero, and these
阅读全文