Problem 2661 --Search - Dictionary

2661: Search - Dictionary

"
Time Limit $2$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $49$ 正确数量 $10$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL

Search III 

Your task is to write a program of a simple dictionary which implements the following instructions:

insert str: insert a string str in to the dictionary 

find str: if the distionary contains str, then print 'yes', otherwise print 'no'

In the first line n, the number of instructions is given. In the following n lines, n instructions are given in the above mentioned format.
Print yes or no for each find instruction in a line.
5
insert A
insert T
insert C
find G
find A
no
yes

A string consists of 'A', 'C', 'G', or 'T' 

1 ≤ length of a string ≤ 12

 n ≤ 1000000

推荐代码 查看2661 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$271 $ms] Hunter 761203 2021-07-21 17:53:12
内存最少[$15424 $KB] AOJ大管家 338734 2018-12-05 23:25:11
第一AC AOJ大管家 338723 2018-12-05 23:14:35
第一挑战 卑微小赵 297058 2018-10-28 14:03:36

赛题来源/所属竞赛 会津大学《挑战数据结构与算法》 挑战数据结构与算法

竞赛编号 竞赛名称 竞赛时间 访问比赛