E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
10815
UVa
10815
- Andy's First Dictionary
Problem B: Andy's First Dictionary Time limit: 3 seconds Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that h
·
2015-11-02 13:22
first
UVa
10815
Andy's First Dictionary
感觉这道题要比之前几个字符串处理的题目难度要大了一些。 题目大意:给若干行字符串,提取出所有单词并去掉重复的,最后按字典顺序输出。 对于输入大致有两种思路,一种是逐个读入字符,遇到字母的话就放到word里面,直到遇到非字母字符,在word最后放'\0'。 我采用第二种思路,就是用gets()函数逐行读到str字符数组里面,然后逐个把单词提取出来。 Count
·
2015-11-02 11:24
first
UVa
10815
- Andy's First Dictionary
题目:统计单词。 分析:字符串处理、字典树。比较裸的字典树,建树输出即可。 注意:库iostream中没有gets。万恶的CE,╮(╯▽╰)╭。 #include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> using name
·
2015-10-27 16:22
first
UVa-
10815
- Andy's First Dictionary
算是抄袭代码 #include<iostream> #include<set> #include<string> #include<sstream> using namespace std; set<string> dict; int main() { string s,buf; while(cin&g
·
2015-10-27 14:23
first
UVA
10815
Andy's First Dictionary
在刷书上的题!这道题基本上和作者的答案差不多,不过就是在插入操作那里我有点问题!百思不得其解!看答案发现用了stringstream,然后才算把这道题解决!#include #include #include #include #include usingnamespacestd; intmain() { stringtmp1,tmp2; sets1; while(cin>>tmp1) { int
MrSiz
·
2015-09-21 19:00
STL
uva
uva
10815
by sixleaves
题目很简单。其实stringstream就的用法和iosteam差不多,所以学习起来是很简单的。stringstream类里面有一个string缓存,str()和str(string)成员函数。 前者用于把stringstream的返回string缓存,后者是把string对象包装成stringstream对象。stringstream类存在于sstream头文件中。其是独立于标准I/O但有类似
·
2015-06-05 00:00
uva
UVA
10815
解题报告
代码链接:UVA
10815
cbs612537
·
2015-04-17 22:00
ACM
水题
uva
10道ACM例题让你三天学会STL
1.泛型程序设计简介与迭代器的介绍2.常见的STL容器及其例题应用(UVA10474,UVA101,UVA
10815
,UVA156,UVA540,UVA136HDU1027,CF501B,HDU1716
dancinglikelink
·
2015-04-10 16:49
UVA -
10815
Andy's First Dictionary
DescriptionProblemB:Andy'sFirstDictionaryTimelimit:3secondsAndy,8,hasadream-hewantstoproducehisveryowndictionary.Thisisnotaneasytaskforhim,asthenumberofwordsthatheknowsis,well,notquiteenough.Insteadof
axiqia
·
2015-04-04 14:00
uva
10815
by sixleaves
uva
10815
bysixleaves题目很简单。其实stringstream就的用法和iosteam差不多,所以学习起来是很简单的。
f(sixleaves) = sixleaves
·
2015-03-16 18:00
uva
10815
set的用法
本题主要学习的就是set的用法。。也知道set中元素有着从小到大排好序的性质。。代码,详情见注释#include #include #include #include #include usingnamespacestd; setdict; intmain() { strings,buf; while(cin>>s) { inti; for(i=0;i>buf;不能写成这样因为有可能在单词前面有标
liujc_
·
2015-02-09 20:00
安迪的第一个字典
没有太多技巧,注意stringstream和set的用法即可(vs2012运行通过)://
10815
.cpp:定义控制台应用程序的入口点。
majing19921103
·
2015-01-23 01:00
C++
set
iterator
stringstream
移动端前端开发调试
http://www.cocoachina.com/webapp/20141231/
10815
.html 移动端的前端开发和测试是非常有必要的。
mrcuiliodng
·
2015-01-04 14:00
前端开发
UVa
10815
,Andy's First Dictionary, set,stringstream
题意:输入一个文本,找出所有不同的单词,按字典序输出所有单词。stringstream通常是用来做数据转换的相比c库的转换,它更加安全,自动和直接#includestringstreamstreamstream>value 读取#include #include #include #include #include usingnamespacestd; setdict; intmain() {
yew1eb
·
2014-09-22 16:00
UVA -
10815
Andy's First Dictionary
DescriptionProblemB:Andy'sFirstDictionaryTimelimit:3secondsAndy,8,hasadream-hewantstoproducehisveryowndictionary.Thisisnotaneasytaskforhim,asthenumberofwordsthatheknowsis,well,notquiteenough.Insteadof
u011345136
·
2014-08-25 16:00
【索引】String
10115-AutomaticEditing
10815
-A
u011345136
·
2014-08-25 16:00
UVA
10815
Andy's First Dictionary
简单题#include #include #include #include usingnamespacestd; intmain(){ strings; setdata; while(cin>>s){ string::size_typei=0; strings2; intlen=s.length(); for(;i::iteratorj; for(j=data.begin();j!=dat
JANESTAR
·
2014-08-02 20:00
uva
UVA
10815
(暑假-字符串(2) -D - Andy's First Dictionary)
#include #include #include intcmp_string(constvoid*a,constvoid*b) { returnstrcmp((char*)a,(char*)b); } intmain(){ charstr[210],word[150010][50]={0}; intn; intcount=0; while(gets(str)){ //转成小写字母 for(
kl28978113
·
2014-07-27 19:00
Uva
10815
Andy's First Dictionary (字典序)
ProblemB:Andy'sFirstDictionaryTimelimit:3secondsAndy,8,hasadream-hewantstoproducehisveryowndictionary.Thisisnotaneasytaskforhim,asthenumberofwordsthatheknowsis,well,notquiteenough.Insteadofthinkingupa
HelloWorld10086
·
2014-07-24 18:00
first
uva
Andys
Dictiona
UVa
10815
- Andy's First Dictionary
看到这题时我就一直在想..如何比较单词是否一样呢...存到一个数组里?然后blabla...简直NoLawToSee.然后我就去看解题报告了...然后我才发现原来qsort也能排二维数组的.那这样问题就解决了,开一个很大的二维数组,然后一个单词一个单词存进去.qsort一下,如果不同的字符串就输出.#include #include #include #include charword[10010
u014247806
·
2014-03-27 22:00
ACM
uva
10815
Android下最好用的开源HTTP 服务器
Android下最好用的开源HTTP服务器Publishedby荒野无灯on2012-08-0100:00:00under软件/酷软分享Tags:http
10815
views在试用过AndroidWebserver
zangcf
·
2014-02-13 11:00
10815
- Andy's First Dictionary
题目:
10815
-Andy'sFirstDictionary题目大意:将题目所给的text里的单词按ASCALL码的顺序排序输出;解题思路:输入一个字符先转换成小写的,再判断是否为字母,是字母的话就存在
u012997373
·
2013-12-08 14:00
UVA
10815
(待修改)
/***********************author:crazy_石头*Pro:UVA
10815
*algorithm:set*JudgeStatus:wrongAnswer*Time:ms*Memory
u012350533
·
2013-11-07 22:00
UVa
10815
- Andy's First Dictionary
题目:统计单词。分析:字符串处理、字典树。比较裸的字典树,建树输出即可。注意:库iostream中没有gets。万恶的CE,╮(╯▽╰)╭。#include #include #include #include usingnamespacestd; //Trie typedefstructnode1 { boolflag; node1*next[26]; }tnode; tnodedict[5
mobius_strip
·
2013-10-10 17:00
UVA
10815
Andy's First Dictionary 安迪的字典 stl应用 set+string做法
题意:给出一串单词,把所有单词改小写去重按字典序输出。以前做过c的版本,现在用stl又写了一遍,当做练习。set可以解决去重和排序问题。代码:#include #include #include #include #include usingnamespacestd; setd; intmain(){ strings; charch; while(getline(cin,s)){ for(in
hcbbt
·
2013-08-24 00:00
ACM
UVa
10815
- Andy's First Dictionary
题目地址:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=20&problem=1756&mosmsg=Submission+received+with+ID+12174014 C++代码: #i
·
2013-08-07 18:00
first
uva
10815
Andy's First Dictionary(字符串处理+sort排序)
ProblemB:Andy'sFirstDictionaryTimelimit:3secondsAndy,8,hasadream-hewantstoproducehisveryowndictionary.Thisisnotaneasytaskforhim,asthenumberofwordsthatheknowsis,well,notquiteenough.Insteadofthinkingupa
u011328934
·
2013-07-25 00:00
10815
- Andy's First Dictionary
题意:在输入的句子中提取出单词,把单词转成小写,然后按从小到大的顺序输出,即生成"字典".思路:1.对每一行,放两个指针一前一后进行遍历,两个连续字母之间的字串即可提取为一个单词.2.把单词转为小写,判断此单词是否已存在,若未存在,则添加到此行的单词集合words中.3.取出在words且未在dictionary中的单词,添加到dictionary中.(这里是使用集合差来实现的)4.把dictio
sailtseng
·
2013-07-04 23:00
first
Dictionary
uva
Andy
10815
UVA
10815
Andy's First Dictionary
Andy'sFirstDictionaryTimeLimit:3000MS MemoryLimit:0KB 64bitIOFormat:%lld&%lluSubmit StatusDescriptionProblemB:Andy'sFirstDictionaryTimelimit:3secondsAndy,8,hasadream-hewantstoproducehisveryown
kg_second
·
2013-01-27 18:00
uva
10815
Andy's First Dictionary stl 函数
Andy'sFirstDictionaryDESCRIPTIONAndy,8,hasadream-hewantstoproducehisveryowndictionary.Thisisnotaneasytaskforhim,asthenumberofwordsthatheknowsis,well,notquiteenough.Insteadofthinkingupallthewordshimsel
yangshuolll
·
2013-01-18 14:00
UVaOJ
10815
- Andy's First Dictionary
AOAPCI: BeginningAlgorithmContests(RujiaLiu) :: Volume1.ElementaryProblemSolving :: StringDescription8岁的小Andy想要自己写一本字典,但是他认识的字不太多。于是他就将他最喜欢的一个故事里面的单词,整理成一本字典。单个或多个连续的字母算作一个单词,所有单词在字典中都小写。且字典按字典序排序(废话)
Ra_WinDing
·
2012-11-10 16:00
10815
- Andy's First Dictionary
这题用gets()是没法过的,大概花了我2小时时间,因为会出现这样的数据:比如上一行的单词没完整,接着下一行还有一部分,这样的话gets就无能为力了,只能用getchar一个一个读入判断。在这里先佩服下刘汝佳大神让做题人wa的能力,,膜拜!#include #include #include #include #defineN1000100 chara[N][210]={'\0'}; intcmp
Hhaile
·
2012-10-24 00:00
UVA
10815
-安迪的第一个字典
#include #include #include #include #include usingnamespacestd; chara[1500000][50]; intcompare(constvoid*a,constvoid*b) { returnstrcmp((char*)a,(char*)b); } intmain() { charc; inti=0,j=0,f=0; while(
shankeliupo
·
2012-08-20 22:00
uva
10815
- Andy's First Dictionary
Andy,8,hasadream-hewantstoproducehisveryowndictionary.Thisisnotaneasytaskforhim,asthenumberofwordsthatheknowsis,well,notquiteenough.Insteadofthinkingupallthewordshimself,hehasabriliantidea.Fromhisbook
Frankiller
·
2012-06-07 21:00
apple
list
input
Dictionary
output
books
10815
- Andy's First Dictionary
ProblemB:Andy'sFirstDictionaryTimelimit:3secondsAndy,8,hasadream-hewantstoproducehisveryowndictionary.Thisisnotaneasytaskforhim,asthenumberofwordsthatheknowsis,well,notquiteenough.Insteadofthinkingupa
zhuyi2654715
·
2012-06-07 00:00
uva-
10815
- Andy's First Dictionary
这道题目也不难,就是把一大段字符串。分割成一个个的单词。然后排序,输出。排序的时候我一开始用的是简单排序法,结果超时了,后来才知道是用的qsort排序。定义数组的时候应该定义大点,至少为100000,应为题目虽然说是最多有5000个单词,但是,有好多单词是重复的,所以,数组小了,就肯定会RE的。#include #include #include chars[100010][210]={'\0'
rowanhaoa
·
2012-05-27 17:00
c
Dictionary
10815
- Andy's First Dictionary未通过
收获:set做存储结构(平衡二叉树),需要调用#includeset::iterator,insert;//程序有问题! //思路:折半查找,插入 //收获:set做存储结构(平衡二叉树),set::iterator,insert; //string::empty(),string重定义后的+号运算 #include #include #include #definewMax50 charword
lhshaoren
·
2012-01-12 23:00
uva
10815
--没过
//#defineLOCAL #include #include #include #include #defineMAXN50000+10 #defineMAX50000+10 charword[MAX]; constintsonsum=26; charbase='a'; intcount; structTrie { intnum;//toremeberhowmanywordcanre
huzhengnan
·
2011-12-14 00:00
UVa
10815
- Andy's First Dictionary
题目大意:读入字符串,并把里面单词按字典序输出。我的程序问题百出,在网上看到个比较好的代码,写的很棒。#include #include #include #include chard[1000010][210]={'\0'}; intn=0,len=0; intcmp_string(constvoid*_a,constvoid*_b) { char*a=(char*)_a; char*b=(
gneveek
·
2011-10-07 13:00
String
Dictionary
uva
10815
Andy's First Dictionary
题意:给你数个字符串,要你把字符串中的所以出现单词,不重复的按字典序输出。#include #include #include #include #include usingnamespacestd; intmain() { charword[1000]; setadj; while(gets(word)) { stringkey=""; intlen=strlen(word); for(int
shiqi_614
·
2011-09-19 23:00
String
iterator
Dictionary
UVa
10815
Andy's First Dictionary
UVa
10815
Andy'sFirstDictionary遍历,找到所有单词,插入到set中即可。
心如止水
·
2011-04-07 19:00
UVA
10815
UVA
10815
Ihatethistypeofproblems...Thekeytothisproblemisthedefinitionofa"word":awordisdefinedasaconsecutivesequenceofalphabets
GLORY | 学习·记录
·
2011-04-03 17:00
UVa
10815
UVa
10815
原题在这里。
Naeioi
·
2010-11-12 19:00
Studying note of GCC-3.4.6 source (111)
FinishfunctionhandlingThenfinish_functionwillfinishfilling-upofnodeofFUNCTION_DECLforthefunction.Wewillgobacktothisfunctionlateragainforotherexample.
10815
tree10816finish_function
wuhui_gdnt
·
2010-10-11 11:00
function
tree
null
processing
nested
optimization
GCC-3.4.6源代码学习笔记(111)
10815
tree10816finish_function(intflags)
wuhui_gdnt
·
2010-10-11 11:00
10815
--Andy's First Dictionary
#include#include#include#include#defineLOCALcharword[5002][202];chart;intcmp_string(constvoid*_a,constvoid*_b){char*a=(char*)(_a);char*b=(char*)(_b);returnstrcmp(a,b);}intmain(){#ifdefLOCALfreopen("in
fengyu0556
·
2010-05-10 01:00
String
Dictionary
上一页
1
2
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他