摘要: To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C Programming Language, Mathematics 阅读全文
posted @ 2019-10-29 12:13 NTS100K 阅读(194) 评论(0) 推荐(0) 编辑
摘要: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro 阅读全文
posted @ 2019-10-29 11:47 NTS100K 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Calculate a + b and output the sum in standard format that is, the digits must be separated into groups of three by commas (unless there are less than 阅读全文
posted @ 2019-10-29 11:37 NTS100K 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 还是设计模式的开卷考试,我想要多准备一点资料,于是写了个爬虫爬取代码与图片,有巧妙地进行格式化进一步处理,最终变为了markdown的格式 首先获得菜鸟教程 工厂模式这个页面的html,转为soup对象 通过观察可知需要爬取的链接都是以‘/design’开头的,所以利用startswith()筛选, 阅读全文
posted @ 2019-10-26 11:39 NTS100K 阅读(556) 评论(0) 推荐(0) 编辑
摘要: /design pattern/factory pattern.html /design pattern/abstract factory pattern.html /design pattern/singleton pattern.html /design pattern/builder patt 阅读全文
posted @ 2019-10-25 22:28 NTS100K 阅读(791) 评论(0) 推荐(0) 编辑
摘要: 设计模式开卷考试给的例子代码都是一个类一个java,实在太恶心了,所以写了一个python脚本. 主要用的os库 API总结: files=listdir(path) 显示当前目录的所有文件名和目录名 endswith() 选择扩展名 windows的路径只需要前面加一个r即可在python程序中使 阅读全文
posted @ 2019-10-24 16:26 NTS100K 阅读(1052) 评论(1) 推荐(1) 编辑
摘要: Input 第一个输入的数字T,代表着T组样例。 接下来输入一个N, 代表一共有N个城镇。 然后读入一个N N的矩阵,第i行第j列代表从i到j高速公路的距离。 Output 对于每个测试用例,您应输出一个包含整数的行,该整数是要构建的最长道路的长度,以便连接所有村庄,并且此值最小。 Sample I 阅读全文
posted @ 2019-10-12 10:19 NTS100K 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题意 有多种汇币,汇币之间可以交换,这需要手续费,当你用100A币交换B币时,A到B的汇率是29.75,手续费是0.39,那么你可以得到(100 0.39) 29.75 = 2963.3975 B币。问s币的金额经过交换最终得到的s币金额数能否增加 货币的交换是可以重复多次的,所以我们需要找出是否存 阅读全文
posted @ 2019-10-12 10:17 NTS100K 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 给定N个字符串,某个字符串转为另一个字符串的花费为他们每一位不相同的字符数。 求最小花费Q。 Input 多组输入,以0结束。 保证N不超过2000。 Output 每组输出"The highest possible quality is 1/Q."。 Sample Input Sample Out 阅读全文
posted @ 2019-10-12 09:53 NTS100K 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 链式前向星,就是依靠存储边来存储图的,适合用来优化DFS、BFS、SPFA这些算法(当图比较稀疏时,如果接近完全图时则不能使用). 我们先来看链式前向星节点的构建,假设有一条从1到2的边,边长为3 w 表示边的权重3 v 表示这条边通向的节点2 next 是下一条源点为1的边在数组中存放的位置,为0 阅读全文
posted @ 2019-10-11 20:12 NTS100K 阅读(604) 评论(0) 推荐(0) 编辑
浏览器标题切换end