07 2015 档案
摘要:Description我们知道,在编程中,我们时常需要考虑到时间复杂度,特别是对于循环的部分。例如,如果代码中出现for(i=1;i 2 #include 3 #include 4 using namespace std; 5 int dp[2003][2003]; 6 void set() 7...
阅读全文
摘要:DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular...
阅读全文
摘要:Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空...
阅读全文
摘要:DescriptionToday on a lecture about strings Gerald learned a new definition of string equivalency. Two stringsaandbof equal length are calledequivalen...
阅读全文
摘要:DescriptionA ring is composed of n (even number) circles as shown in diagram. Put natural numbersinto each circle separately, and the sum of numbers i...
阅读全文
摘要:DescriptionGiven a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of the maximum positive product involving con...
阅读全文
摘要:DescriptionWrite a program that finds and displays all pairs of 5-digit numbers that between them use the digits0through9once each, such that the firs...
阅读全文
摘要:Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。...
阅读全文
摘要:DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital l...
阅读全文
摘要:Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、...
阅读全文
摘要:The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, eac...
阅读全文
摘要:Perhaps you all have heard the mythical story about Tower of Hanoi (The details of this story is not required to solve this problem): “There is a towe...
阅读全文
摘要:Time Limit:1000MSMemory Limit:10000KTotal Submissions:3721Accepted:1290DescriptionA math instructor is too lazy to grade a question in the exam papers...
阅读全文
摘要:DescriptionOn February, 30thnstudents came in the Center for Training Olympiad Programmers (CTOP) of the Berland State University. They came one by on...
阅读全文
摘要:DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have ...
阅读全文
摘要:DescriptionMike has many friends. Here are nine of them: Alice, Bob, Carol, Dave, Eve, Frank, Gloria, Henry and Irene.Mike is so skillful that he can ...
阅读全文
摘要:DescriptionYou play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend on...
阅读全文
摘要:Time Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusPracticeZOJ 3876DescriptionAs a university advocating self-learning and wo...
阅读全文
摘要:Time Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusPracticeZOJ 3878DescriptionEdward, a poor copy typist, is a user of the Dv...
阅读全文
摘要:Time Limit:3000MSMemory Limit:131072KB64bit IO Format:%lld & %lluSubmitStatusPracticeZOJ 3870DescriptionFor an upcoming programming contest, Edward, t...
阅读全文
摘要:Description有三户人家共拥有一座花园,每户人家的太太均需帮忙整理花园。A 太太工作了5 天,B 太太则工作了4 天,才将花园整理完毕。C 太太因为正身怀六甲无法加入她们的行列,便出了90元。请问这笔钱如何分给A、B 二位太太较为恰当?A 应得多少元?90/(5+4)*5=$50 元?如果这...
阅读全文
摘要:DescriptionThere are many unsolvable problem in the world.It could be about one or about zero.But this time it is about bigger number.Given an integer...
阅读全文
摘要:DescriptionA group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arr...
阅读全文
摘要:Description从m个不同元素中取出n(n≤m)个元素的所有组合的个数,叫做从m个不同元素中取出n个元素的组合数。组合数的计算公式如下:C(m,n) =m!/((m-n)!n!)现在请问,如果将组合数C(m,n)写成二进制数,请问转这个二进制数末尾有多少个零。Input第一行是测试样例的个数T...
阅读全文
摘要:DescriptionThere is a mysterious organization calledTime-Space Administrative Bureau(TSAB) in the deep universe that we humans have not discovered yet...
阅读全文
摘要:DescriptionEdward has an arrayAwithNintegers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wan...
阅读全文
摘要:You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) which is basically a text editor with bells and whistles. ...
阅读全文

浙公网安备 33010602011771号