
c++
文章平均质量分 81
干掉学霸我称王
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Add More Zero
There is a youngster known for amateur propositions concerning several mathematical hard problems.Nowadays, he is preparing a thought-provoking problem on a specific type of supercomputer which原创 2017-07-31 09:45:32 · 218 阅读 · 0 评论 -
Foreign Exchange
Your non-profit organization (iCORE - international Confederation of Revolver Enthusiasts) coordinatesa very successful foreign student exchange program. Over the last few years, demand hassky-roc翻译 2017-07-23 09:03:22 · 459 阅读 · 0 评论 -
Compound Words
You are to find all the two-word compound words in a dictionary. A two-word compound word is aword in the dictionary that is the concatenation of exactly two other words in the dictionary.InputS翻译 2017-07-23 09:05:25 · 2523 阅读 · 0 评论 -
Symmetry
The figure shown on the left is left-right symmetric as it is possible to fold the sheet of paper along avertical line, drawn as a dashed line, and to cut the figure into two identical halves. The f翻译 2017-07-23 09:08:40 · 856 阅读 · 0 评论 -
Printer Queue
The only printer in the computer science students’union is experiencing an extremely heavy workload.Sometimes there are a hundred jobs in the printerqueue and you may have to wait for hours to g原创 2017-07-23 09:21:33 · 625 阅读 · 0 评论 -
Getting Difference
Problem StatementThere is a box containing N balls. The i-th ball has the integer Ai written on it. Snuke can perform the following operation any number of times:Take out two balls from the box.翻译 2017-07-24 10:11:54 · 347 阅读 · 0 评论 -
TEX Quotes
TEX is a typesetting language developed by Donald Knuth. It takes source text together with a fewtypesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use “an原创 2017-07-24 13:33:10 · 461 阅读 · 0 评论 -
Grid Coloring
Problem StatementWe have a grid with H rows and W columns of squares. Snuke is painting these squares in colors 1, 2, …, N. Here, the following conditions should be satisfied:For each i (1≤i≤N),原创 2017-08-07 09:47:18 · 914 阅读 · 0 评论 -
4-adjacent
Problem StatementWe have a sequence of length N, a=(a1,a2,…,aN). Each ai is a positive integer.Snuke's objective is to permute the element in a so that the following condition is satisfied:F原创 2017-08-07 09:51:17 · 667 阅读 · 0 评论 -
装箱
A set of n 1-dimensional items have to be packed in identical bins. All bins have exactly the samelength l and each item i has length li ≤ l. We look for a minimal number of bins q such that• each原创 2017-08-14 19:15:03 · 324 阅读 · 0 评论 -
AtCoder Beginner Contest 070
A - Palindromic NumberTime limit : 2sec / Memory limit : 256MBScore : 100 pointsProblem StatementYou are given a three-digit positive integer N.Determine whether N is a palindromic numbe原创 2017-08-14 19:28:32 · 418 阅读 · 0 评论 -
第7届福建省赛练习赛
A - Card Game (First Edition) Fat brother and Maze are playing a kind of special (hentai) game with some cards. There are N*2 cards in this game for the players to use, this is the c原创 2017-08-14 19:53:19 · 537 阅读 · 0 评论 -
Throwing cards away I
Given is an ordered deck of n cards numbered 1to n with card 1 at the top and card n at thebottom. The following operation is performed aslong as there are at least two cards in the deck:Throw翻译 2017-07-23 08:57:23 · 407 阅读 · 0 评论 -
Ducci Sequence
A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1, a2, · · · , an),the next n-tuple in the sequence is formed by taking the absolute differences of neighboring翻译 2017-07-23 08:54:46 · 409 阅读 · 0 评论 -
全排列问题
输出自然数1到n所有不重复的排列,即n的全排列,要求所产生的任一数字序列中不允许出现重复的数字。输入输入 n(1≤n≤9)输出由1~n组成的所有不重复的数字序列,每行一个序列。每个数字占5列。样例输入4样例输出 1 2 3 4 1 2 4 3 1 3 2 4 1翻译 2017-07-22 13:54:30 · 1049 阅读 · 0 评论 -
Dropping Balls
A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Eachtime the ball being dropped first visits a non-terminal node. It then keeps moving down, either fol翻译 2017-07-22 15:25:52 · 835 阅读 · 0 评论 -
输出N个不同字母的全排列
输入正整数n(n<10),输出ABCD...n个不同字母的全排列,输出时按升序每行显示一个结果输入正整数N(N<10)输出N个字母的全排列,升序排列,每行一个样例输入4样例输出ABCDABDCACBDACDBADBCADCBBACDBADCBCADBCDABDACBDCACABDCADBCBADCBDA翻译 2017-07-22 15:30:11 · 6501 阅读 · 0 评论 -
排列棋子
将M个白棋子与N个黑棋子排成一行,可以排成多种不同的图案。例如:2个白棋子和2个黑棋子,一共可以排成如下图所示的6种图案(根据组合数计算公式:)说明: http://10.60.64.213:8080/JudgeOnline/images/4736_2.bmp请你编写一段程序,输出M个白棋子与N个黑棋子能够组成的所有图案。为了避免程序输出结果过多导致严重超时,特转载 2017-07-22 15:31:18 · 1033 阅读 · 0 评论 -
组合的输出
排列与组合是常用的数学方法,其中组合就是从n个元素中抽出r个元素(不分顺序且r 现要求你用递归的方法输出所有组合。 例如n=5,r=3,所有组合为: l 2 3 l 2 4 1 2 5 l 3 4 l 3 5 1 4 5 2 3 4 2 3 5 2 4 5 3 4 5输入一行两个自然数n、r(翻译 2017-07-22 15:32:36 · 585 阅读 · 0 评论 -
有重复元素的排列问题
题目描述 设R={ r1, r2 , …, rn}是要进行排列的n个元素。其中元素r1, r2 , …, rn可能相同。试设计一个算法,列出R的所有不同排列。 给定n 以及待排列的n 个元素。计算出这n 个元素的所有不同排列。输入输入数据的第1 行是元素个数n,1≤n≤500。接下来的1 行是待排列的n个元素。输出计算出的n个元翻译 2017-07-22 15:33:37 · 1496 阅读 · 0 评论 -
集合划分问题
题目描述设S是一个具有n个元素的集合,S={a1,a2,……,an},现将S划分成k个满足下列条件的子集合S1,S2,……,Sk ,且满足: 则称S1,S2,……,Sk是集合S的一个划分。它相当于把S集合中的n个元素a1 ,a2,……,an 放入k个(0<k≤n<30)无标号的盒子中,使得没有一个盒子为空。请你确定n个元素a1 ,a2 ,……,an 放入k个无标号盒子中转载 2017-07-22 15:34:55 · 828 阅读 · 0 评论 -
数的计数
题目描述 我们要求找出具有下列性质数的个数(包含输入的自然数n): 先输入一个自然数n(n≤1000), 然后对此自然数按照如下方法进行处理: 1.不作任何处理; 2.在它的左边加上一个自然数,但该自然数不能超过原数(输入的n)的一半; 3.加上数后,继续按此规则进行处理,直到不能再加自然数为止。翻译 2017-07-22 15:38:00 · 580 阅读 · 0 评论 -
简单背包问题
题目描述 简单的背包问题。设有一个背包,可以放入的重量为s。现有n件物品,重量分别为w1,w2…,wn,(1≤i≤n)均为正整数,从n件物品中挑选若干件,使得放入背包的重量之和正好为s。找到一组解即可。如果找不到,输出"not found"(引号不输出)输入第一行是物品总件数和背包的载重量,第二行为各物品的重量。输出 各所选物品重量(按编号从小到大顺序输出)翻译 2017-07-22 15:38:48 · 1573 阅读 · 0 评论 -
Alignment of Code
You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) whichis basically a text editor with bells and whistles. You are working on a module that takes a piece of翻译 2017-07-23 08:52:13 · 418 阅读 · 0 评论 -
Rails
There is a famous railway station in PopPush City. Country there is incredibly hilly. The stationwas built in last century. Unfortunately, funds were extremely limited that time. It was possible to转载 2017-07-22 15:53:52 · 362 阅读 · 0 评论 -
双色Hanoi塔问题
题目描述 设A、B、C是3 个塔座。开始时,在塔座A 上有一叠共n 个圆盘,这些圆盘自下而上,由大到小地叠在一起。各圆盘从小到大编号为1,2,……,n,奇数号圆盘着蓝色,偶数号圆盘着红色,如图所示。现要求将塔座A 上的这一叠圆盘移到塔座B 上,并仍按同样顺序叠置。在移动圆盘时应遵守以下移动规则: 规则(1):每次只能移动1 个圆盘;转载 2017-07-22 15:39:57 · 1291 阅读 · 0 评论 -
AtCoder Beginner Contest 072
A - Sandglass2Time limit : 2sec / Memory limit : 256MBScore : 100 pointsProblem StatementWe have a sandglass that runs for X seconds. The sand drops from the upper bulb at a rate o原创 2017-10-14 18:29:43 · 526 阅读 · 0 评论