自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

乌云踏雪

不求红红火火,只求基本操作

  • 博客(10)
  • 收藏
  • 关注

原创 DNA序列(DNA Consensus String, ACM/ICPC Seoul 2006, UVa1368)

Written by Robert_Wang in Southwest University of Science And Technology.输入m个长度均为n的DNA序列,求一个DNA序列,到所有序列的总Hamming距离尽量小。两个等长字符串的Hamming距离等于字符不同的位置个数,例如,ACGT和GCGA的Hamming距离为2(左数第1, 4个字符不同)。输入整数m和n(4≤m≤50...

2018-03-07 19:22:46 463

原创 栈及其应用

Written by Robert_Wang in Southwest University of Science And Technology.#include<iostream>#define MaxSize 100 using namespace std;typedef char ElemType;typedef struct{ ElemType data[MaxSi...

2018-03-06 21:38:52 304

原创 分子量(Molar Mass, ACM/ICPC Seoul 2007, UVa1586)

Written by Robert_Wang in Southwest University of Science And Technology.给出一种物质的分子式(不带括号),求分子量。本题中的分子式只包含4种原子,分别为C, H, O, N,原子量分别为12.01, 1.008, 16.00, 14.01(单位:g/mol)。例如,C6H5OH的分子量为94.108g/mol。分析:做一个函...

2018-03-05 13:23:58 491 1

原创 线性表的综合应用实例

Written by Robert_Wang in Southwest University of Science And Technology.#include<iostream>#define Max 100using namespace std;typedef int ElemType;typedef struct{ ElemType data[Max]; int ...

2018-03-04 22:02:36 3811

原创 线性表的应用——连接操作

Written by Robert_Wang in Southwest University of Science And Technology.#include<iostream>#define MaxCol 10using namespace std;typedef int ElemType;typedef struct DNode{ ElemType data[Max...

2018-03-03 21:03:00 364

原创 生成元(Digit Generator, ACM/ICPC Seoul 2005, UVa1583)

Written by Robert_Wang in Southwest University of Science And Technology.如果x加上x的各个数字之和得到y,就说x是y的生成元。给出n(1≤n≤100000),求最小生成元。无解输出0。例如,n=216,121,2005时的解分别为198,0,1979。分析:对于给定的数n,需要从[1,n-1]去找他的最小元,所以在多次执行时...

2018-03-03 19:26:42 230

原创 猜数字游戏的提示(Master-Mind Hints, UVa 340)

Written by Robert_Wang in Southwest University of Science And Technology.实现一个经典"猜数字"游戏。给定答案序列和用户猜的序列,统计有多少数字位置正确(A),有多少数字在两个序列都出现过但位置不对(B)。输入包含多组数据。每组输入第一行为序列长度n,第二行是答案序列,接下来是若干猜测序列。猜测序列全0时该组数据结束。n=0时...

2018-03-03 18:49:31 593

原创 双链表的系列操作

Written by Robert_Wang in Southwest University of Science And Technology.#include<iostream>using namespace std;typedef int ElemType;typedef struct DNode{ ElemType data; struct DNode *prior...

2018-03-01 22:10:58 147

原创 TeX中的引号---一道竞赛题

Written by Robert_Wang in Southwest University of Science And Technology.在TeX中,左双引号是“``”,右双引号是“''”。输入一篇包含双引号的文章,你的任务是把它转换成TeX的格式。样例输入:"To be or not to be," quoth the Bard, "thatis the question".样例输出:`...

2018-03-01 16:38:18 355

原创 竖式计算

Written by Robert_Wang in Southwest University of Science And Technology.分析:这个就是模仿我们小学学的乘法。。。。。如:要求是:找出所有形如abc*de(三位数乘以两位数)的算式,使得在完整的竖式中,所有数字都属于一个特定的数字集合。输入数字集合(相邻数字之间没有空格),输出所有竖式。每个竖式前应有编号,之后应有一个空行。最...

2018-03-01 15:38:35 1443

空空如也

空空如也

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

TA关注的人

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