自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(36)
  • 收藏
  • 关注

原创 链表

#include<stdio.h>#include<stdlib.h>#include<math.h>typedef int ElemType;typedef struct Lnode{ ElemType data; struct Lnode *next;}LNode;LNode *L,*L1,*L2;LNode *creat...

2018-05-07 15:49:27 253

原创 线性表

#include<stdio.h>#include<stdlib.h>#define MAXSIZE 20typedef int ElemType;typedef struct{ ElemType a[MAXSIZE]; int length;}SqList;SqList a,b,c;void creat_list(SqList *L);v...

2018-05-07 15:47:34 253

原创 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 436

原创 第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 470

原创 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 347

原创 装箱

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 286

原创 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 601

原创 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 823

原创 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 164

原创 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 405

翻译 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 291

原创 单词数

lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。Input有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。Output每组只输出一个整数,其单独成行,该整数代表一篇文章里不同单词的总数。Sample In

2017-07-23 09:38:48 281

翻译 Error Correction

A boolean matrix has the parity property when each row and each column has an even sum, i.e. containsan even number of bits which are set. Here’s a 4 × 4 matrix which has the parity property:1 0 1

2017-07-23 09:37:41 783

翻译 Team Queue

Queues and Priority Queues are data structures which are known to most computer scientists. TheTeam Queue, however, is not so well known, though it occurs often in everyday life. At lunch time the

2017-07-23 09:35:39 570

翻译 Ananagrams

Most crossword puzzle fans are used to anagrams — groups of words with the same letters in differentorders — for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have thisattribu

2017-07-23 09:33:09 356

翻译 Andy's First Dictionary

Andy, 8, has a dream - he wants to produce hisvery own dictionary. This is not an easy task forhim, as the number of words that he knows is,well, not quite enough. Instead of thinking up allth

2017-07-23 09:31:23 231

翻译 The Blocks Problem

Many areas of Computer Science use simple, abstract domains for both analytical and empirical studies.For example, an early AI study of planning and robotics (STRIPS) used a block world in which a r

2017-07-23 09:29:37 272

原创 Where is the Marble?

Raju and Meena love to play with Marbles. They have got a lot ofmarbles with numbers written on them. At the beginning, Raju wouldplace the marbles one after another in ascending order of the numb

2017-07-23 09:27:24 178

原创 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 556

翻译 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 773

翻译 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 2445

翻译 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 408

翻译 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 341

翻译 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 264

翻译 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 334

转载 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 279

转载 双色Hanoi塔问题

题目描述            设A、B、C是3 个塔座。开始时,在塔座A 上有一叠共n 个圆盘,这些圆盘自下而上,由大到小地叠在一起。各圆盘从小到大编号为1,2,……,n,奇数号圆盘着蓝色,偶数号圆盘着红色,如图所示。现要求将塔座A 上的这一叠圆盘移到塔座B 上,并仍按同样顺序叠置。在移动圆盘时应遵守以下移动规则:       规则(1):每次只能移动1 个圆盘;

2017-07-22 15:39:57 1214

翻译 简单背包问题

题目描述 简单的背包问题。设有一个背包,可以放入的重量为s。现有n件物品,重量分别为w1,w2…,wn,(1≤i≤n)均为正整数,从n件物品中挑选若干件,使得放入背包的重量之和正好为s。找到一组解即可。如果找不到,输出"not found"(引号不输出)输入第一行是物品总件数和背包的载重量,第二行为各物品的重量。输出 各所选物品重量(按编号从小到大顺序输出)

2017-07-22 15:38:48 1499

翻译 数的计数

题目描述 我们要求找出具有下列性质数的个数(包含输入的自然数n):       先输入一个自然数n(n≤1000), 然后对此自然数按照如下方法进行处理:       1.不作任何处理;       2.在它的左边加上一个自然数,但该自然数不能超过原数(输入的n)的一半;       3.加上数后,继续按此规则进行处理,直到不能再加自然数为止。

2017-07-22 15:38:00 519

转载 集合划分问题

题目描述设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 733

翻译 有重复元素的排列问题

题目描述      设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 1428

翻译 组合的输出

排列与组合是常用的数学方法,其中组合就是从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 541

转载 排列棋子

将M个白棋子与N个黑棋子排成一行,可以排成多种不同的图案。例如:2个白棋子和2个黑棋子,一共可以排成如下图所示的6种图案(根据组合数计算公式:)说明: http://10.60.64.213:8080/JudgeOnline/images/4736_2.bmp请你编写一段程序,输出M个白棋子与N个黑棋子能够组成的所有图案。为了避免程序输出结果过多导致严重超时,特

2017-07-22 15:31:18 900

翻译 输出N个不同字母的全排列

输入正整数n(n<10),输出ABCD...n个不同字母的全排列,输出时按升序每行显示一个结果输入正整数N(N<10)输出N个字母的全排列,升序排列,每行一个样例输入4样例输出ABCDABDCACBDACDBADBCADCBBACDBADCBCADBCDABDACBDCACABDCADBCBADCBDA

2017-07-22 15:30:11 6216

翻译 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 767

翻译 全排列问题

输出自然数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 949

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除