visiting专题

***Leetcode 847. Shortest Path Visiting All Nodes | 状压dp+dfs

https://leetcode.com/problems/shortest-path-visiting-all-nodes/description/ 非常不错的题,状压dp,state表示已经去过哪些。 一个非常重要的剪枝是,如果一个结点的出度是x,那么如果现在是第x+1次访问这个结点,就必然是重复状态 int dp[ (1<<13)+10 ][ 13 ];int MX = INT_MAX

ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛 题目1 : Visiting Peking University

题目1 : Visiting Peking University 时间限制: 1000ms 单点时限: 1000ms 内存限制: 256MB 描述 Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2, …,

ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛-题目1 : Visiting Peking University

时间限制: 1000ms 单点时限: 1000ms 内存限制: 256MB 描述 Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2, …, n-1. He plans to spend m consecutive days