摘要: 题目: Description 妈妈每天都要出去买菜,但是回来后,兜里的钱也懒得数一数,到底花了多少钱真是一笔糊涂帐。现在好了,作为好儿子(女儿)的你可以给她用程序算一下了,呵呵。 Input 输入含有一些数据组,每组数据包括菜种(不含空格的字串),数量w(计量单位不论,一律为double型数)和单 阅读全文
posted @ 2017-08-15 23:32 Reqaw 阅读(1023) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://acm.zzuli.edu.cn/zzuliacm/problem.php?id=1134 Description 输入一个以回车结束的字符串,它由数字和字母组成,请过滤掉所有非数字字符,然后将数字字符串转换成十进制整数后乘以2输出。 Input 输入一个以回车结束的字符 阅读全文
posted @ 2017-08-15 23:16 Reqaw 阅读(1476) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1233 题意描述: 输入n个城镇以及n*(n-1)/2条道路信息 计算并输出将所有城镇连通或者间接连通需要修建的最短道路的总长度 解题思路: 最小生成树问题模板题,使用克鲁斯卡尔算法即可。 AC代码: 阅读全文
posted @ 2017-08-15 15:15 Reqaw 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1232 Problem Description 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直 阅读全文
posted @ 2017-08-15 14:53 Reqaw 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 题目: You are given a 2D board where in some cells there are gold. You want to fill the board with 2 x 1 dominoes such that all gold are covered. You ma 阅读全文
posted @ 2017-08-15 09:27 Reqaw 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 题目: You run a marriage media. You take some profiles for men and women, and your task is to arrange as much marriages as you can. But after reading th 阅读全文
posted @ 2017-08-15 09:16 Reqaw 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://poj.org/problem?id=3041 Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N gr 阅读全文
posted @ 2017-08-15 08:58 Reqaw 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://poj.org/problem?id=1422 Description Consider a town where all the streets are one-way and each street leads from one intersection to anot 阅读全文
posted @ 2017-08-15 08:46 Reqaw 阅读(210) 评论(0) 推荐(0) 编辑