摘要: 1078. Hashing (25)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of t 阅读全文
posted @ 2017-09-03 03:27 forjiuzhou 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is t 阅读全文
posted @ 2017-08-30 22:31 forjiuzhou 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1080. Graduate Admission (30) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 200 ms 时间限制 200 ms 内存限制 65536 kB 内存限制 65536 kB 阅读全文
posted @ 2017-08-28 00:22 forjiuzhou 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1085. Perfect Sequence (25) 时间限制 300 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CAO, Peng 时间限制 300 ms 时间限制 300 ms 内存限制 65536 kB 内存限制 65536 kB 代码 阅读全文
posted @ 2017-08-26 17:33 forjiuzhou 阅读(188) 评论(0) 推荐(0) 编辑
摘要: double to string时候,会越界引起异常。但似乎pat可以通过 #include <iostream>#include <cctype>#include <string>#include <cstdio>#include <sstream>using namespace std;bool 阅读全文
posted @ 2017-08-06 17:35 forjiuzhou 阅读(638) 评论(0) 推荐(0) 编辑
摘要: 在图中的深度优先搜索,由于避免回路的产生,设置visit数组。 有两种深度优先的应用场景。一种是用于最优解的寻找,即到达目的地的最优解。这时需要设置全局的一个数组,还有变量,来储存路径。通过与别的方法的比较,获取最优解。 第二种是染色问题,只要求全部遍历,没有最优的要求。 还有哈希的用法。当需要记录 阅读全文
posted @ 2017-07-15 22:56 forjiuzhou 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, a 阅读全文
posted @ 2017-07-15 22:45 forjiuzhou 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of b 阅读全文
posted @ 2017-07-10 19:03 forjiuzhou 阅读(136) 评论(0) 推荐(0) 编辑