Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

.....不用二分搜索,不用map,不用hash,因为都不了解~~~~= =||| 1181ms险过,这是我只用qsort的思路~~WA了无数次的看看这些有没有你没有注意的~

Posted by yiwen028 at 2009-08-17 17:51:08 on Problem 2503
本题题意很简单。
我的方法
结构体包含 word,english,n;
字典的word是外语,english是翻译后的英语,n是无穷大
要翻译的word是输入值,english初始化为eh,n从按照输入顺序从1->n;
把所有的字典,和要翻译的外国语全部存在一个数组,然后按照word从小到大排序,相同的按照n从大到小,再把相同的word的english全部赋为字典的word 的english值,再按照n从小到大排序,输出n不为无穷大的english值!!!即可~~~

注意:
要你翻译的外国语,有重复出现!!

有群名曰 ACM 群号89693382 ~~~欢迎各位 菜鸟 大牛 加入,互相学习,交流~~~~

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator