- 1、本文档共12页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
COCI 2012/2013 Task MORTADELA
nd th
2 round, November 10 , 2012 Author: Nikola Dmitrović
S e mortadella prices are expressed in a nonstandardized format “X
dollars for Y grams”, we should first convert them to a format that we can
compare. One possible method is finding the price of a single gram of
mortadella. It can be obtained by dividing the price with the mass. Finally,
we have to find the minimum price of one gram and multiply it by 1000. The
pseudocode is given below:
read (XNSC,YNSC);
read (n);
price:=XNSC/YNSC;
for i:=1 to n do
{
read (Xi,Yi);
if Xi/Yi<price then
price:=Xi/Yi;
};
write (price*1000);
Necessary skills: input/output, for loop, finding minimum value
Category: ad-hoc
COCI 2012/2013 Task KRIZALJKA
nd th
2 round, November 10 , 2012 Author: Satja Kurdija
We can use a triple-nested for loop to choose crossword rows in all possible
ways. Then we arrange them into a 3 by 3 matrix. The last remaining step is
checking whether the crossword columns match the remaining three words.
The simplest method for this is finding the three strings corresponding to the
matrix columns, sorting them lexicographically and comparing with the
remaining three strings from the input (which are already sorted
lexicographically).
There is another reason that makes the sorted order of the given words
convenient: as soon as we find a matching crossword, we can immedia y
stop the searc owing that we have found the solution – provided that the
outermost for loop chooses the first word index in order from 1 to 6, the
middle one chooses the secon
您可能关注的文档
- 4599糖精钠口服液.pdf
- c2128传感器安全带张力.pdf
- 模板工程款流程.pdf
- 重症监护病房右心室功能评估.pdf
- 2023年湖南省长沙市宁乡市回龙铺镇金旺村(社区工作人员)自考复习100题模拟考试含答案.docx
- 2023年06月辽宁锦州市凌河区招考聘用区属小学教师30人笔试历年高频考点试题专家题荟萃附带答案详解.pdf
- 2023年08月湖北恩施州建始县县直部分学校 业州镇 长梁镇部分学校选聘教师40人笔试历年高频考点试题专家题荟萃附带答案详解.pdf
- 2021-2022年山东省日照市注册会计审计.docx
- 辽宁省葫芦岛市注册会计公司战略与风险管理专项练习(含答案).docx
- 2022年河北省唐山市注册会计公司战略与风险管理模拟考试(含答案).docx
- 销售部月度工作计划表(合集).docx
- 2023年云南省楚雄州永仁县维的乡的鲁村社区工作人员(综合考点共100题)模拟测试练习题含答案.docx
- 2023年广西钦州市灵山县那隆镇塘表村(社区工作人员)自考复习100题模拟考试含答案.docx
- 2023年河北省廊坊市固安县宫村镇北赵三村社区工作人员(综合考点共100题)模拟测试练习题含答案.docx
- 2023年湖南省永州市冷水滩区高溪市镇高溪市街道(社区工作人员)自考复习100题模拟考试含答案.docx
- 2023年北京市房山区阎村镇肖庄村社区工作人员(综合考点共100题)模拟测试练习题含答案.docx
- 2023年内蒙古呼伦贝尔市陈巴尔虎旗巴彦库仁镇陈旗工业园区(社区工作人员)自考复习100题模拟考试含答案.docx
- 2023年08月湖北省黄冈中学第四批专项公开招聘1名教师笔试历年高频考点试题专家题荟萃附带答案详解.pdf
- 2023年10月黑龙江齐齐哈尔医学院附属第二医院编制外招考聘用笔试历年高频考点试题专家题荟萃附带答案详解.pdf
- 2023年陕西省咸阳市旬邑县职田镇恒安洲村社区工作人员(综合考点共100题)模拟测试练习题含答案.docx
1亿VIP精品文档
相关文档
最近下载
- 社会评估 文化评估(健康评估课件).pptx VIP
- 2023年甘肃省中考数学试卷真题(含标准答案)+2022年试卷及答案.docx
- 《篮球行进间运球》.ppt VIP
- 国家开放大学《生产与运作管理》形考作业1-4参考答案-20221.docx
- 2023年甘肃省中考化学+物理试卷真题(含官方标准答案).docx
- 通用版《挺膺担当》主题团课PPT.ppt VIP
- 片状氧化铝及氧化铝基珠光颜料的制备及性能研究的开题报告.docx
- 《改造加固梁,柱包钢施工方案》.docx VIP
- 小学语文一年级上册语文练习题试卷题可打印(共十套).docx VIP
- 2023年甘肃省中考道德与法治、历史、生物、地理综合试卷试卷真题(含官方标准答案).docx
文档评论(0)