摘要:
DescriptionWrite a program that finds and displays all pairs of 5-digit numbers that between them use the digits0through9once each, such that the firs... 阅读全文
摘要:
DescriptionA magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the problem is, the sys... 阅读全文
摘要:
Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。Input共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束... 阅读全文
摘要:
DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 2 #include... 阅读全文
摘要:
DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital l... 阅读全文
摘要:
DescriptionA math instructor is too lazy to grade a question in the exam papers in which students are supposed to produce a complicated formula for th... 阅读全文
摘要:
Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、... 阅读全文
摘要:
Two bored soldiers are playing card war. Their card deck consists of exactlyncards, numbered from1ton,all values are different. They divide cards betw... 阅读全文
摘要:
You are given a string consisting of parentheses()and[]. A string of this type is said to becorrect:(a)if it is the empty string(b)if A and B are corr... 阅读全文
摘要:
DescriptionThe only printer in the computer science students' union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs in... 阅读全文