码迷,mamicode.com
首页 >  
搜索关键字:pat    ( 13517个结果
Pat(Advanced Level)Practice--1089(Insert or Merge )
Pat1089代码 题目描述: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element ...
分类:其他好文   时间:2015-01-10 01:31:42    阅读次数:282
Pat(Advanced Level)Practice--1087(All Roads Lead to Rome)
Pat1087代码 题目描述: Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness. Input S...
分类:其他好文   时间:2015-01-10 01:31:07    阅读次数:245
Pat(Advanced Level)Practice--1090(Highest Price in Supply Chain)
Pat1090代码 题目描述: A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer. Starting from one root supp...
分类:其他好文   时间:2015-01-10 01:28:52    阅读次数:212
Pat(Advanced Level)Practice--1085(Perfect Sequence)
Pat1085代码 题目描述: Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M Now given a sequence and a parameter p, you are s...
分类:其他好文   时间:2015-01-09 23:48:11    阅读次数:495
Pat(Advanced Level)Practice--1086(Tree Traversals Again)
Pat1086代码 题目描述: An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6...
分类:其他好文   时间:2015-01-09 23:45:43    阅读次数:201
有代价的单源最短路径
问题:有代价的单源最短路径,并要求存储路径。(求最短的路径,并使代价最小)特点:* 存储路径:决定了难以用dijkstra,可以用flody,用path[i][j]表示 i 想走到 j 迈出的第一步。假设k是 i->j 的中间节点,更新时候用path[i][j] = path[i][k],具体做法见link。但是flody比较耗时(O(N^3))* 有代价:如果想用flody的话,有要求代价最小,...
分类:其他好文   时间:2015-01-09 14:20:51    阅读次数:191
PAT Mooc datastructure 6-1
Saving James Bond - Hard VersionThis time let us consider the situation in the movie "Live and Let Die" in which James Bond, the world's most famous s...
分类:其他好文   时间:2015-01-09 01:32:46    阅读次数:311
06-5. 关键活动(30) 关键路径 和输出关键路径
06-5. 关键活动(30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 本实验项目是实验项目6-06的深化。任务调度问题中,如果还给出了完成每个子任务需要的时间,则我们可以算出完成整个工程需要的最短时间。在这些子任务中,有些...
分类:其他好文   时间:2015-01-08 21:43:16    阅读次数:632
MySQL-10-mysql编程
MySQL编程 1.语句结束符   默认有两个: ; 和 \g(只能在命令行中使用) 可以使用delimiter 命令来修改语句结束符,例如: delimiter $$(注意,一般手工修改结束符后再改回默认值 ;)   2.注释   a) 行注释: # 和 --[空格] b) 块注释: /* */   3.变量 a) 系统变量: show variables [like pat...
分类:数据库   时间:2015-01-06 23:11:22    阅读次数:314
Git Step by Step – (7) Git远程仓库(续)
上一篇文章介绍了Git远程仓库的一些使用,但是还是有些东西需要补充一下,所以有了这个续篇。.gitignore前一篇中,我们介绍了Git的patch功能,当我们生成patch之后,"git status"就会显示patch文件是"Untracked files"。当然,我们也没有必要去跟踪这个pat...
分类:其他好文   时间:2015-01-05 00:27:04    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!