首页 > TAG信息列表 > 1177

【TWVRP】基于matlab遗传算法求解带时间窗的含充电站的VRP问题【含Matlab源码 1177期】

一、简介 1 遗传算法概述 遗传算法(Genetic Algorithm,GA)是进化计算的一部分,是模拟达尔文的遗传选择和自然淘汰的生物进化过程的计算模型,是一种通过模拟自然进化过程搜索最优解的方法。该算法简单、通用,鲁棒性强,适于并行处理。 2 遗传算法的特点和应用 遗传算法是一类可用于复杂系统

Picture POJ - 1177

原题链接 考察:线段树 扫描线求周长 思路:   以x轴为例,先看图.   由此就比较好求了.这里cnt有值就可以贡献长度,所以可以不用push_down. Code #include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; const int N = 5010; st

[LeetCode] 1177. Can Make Palindrome from Substring

Given a string s, we make queries on substrings of s. For each query queries[i] = [left, right, k], we may rearrange the substring s[left], ..., s[right], and then choose up to k of them to replace with any lowercase English letter.  If the substrin

【leetcode】1177. Can Make Palindrome from Substring

题目如下: Given a string s, we make queries on substrings of s. For each query queries[i] = [left, right, k], we may rearrange the substring s[left], ..., s[right], and then choose up to k of them to replace with any lowercase English letter.  If th

POJ 1177 Picture & HDU 1255 覆盖的面积 【线段树+离散化+扫描线】

题目来源: POJ http://poj.org/problem?id=1177 HDU :http://acm.hdu.edu.cn/showproblem.php?pid=1255 ★实在是蔡,扫描线居然硬是看了一天,就发篇博客说说叭 扫描线: 扫描线一般运用在图形处理上面,来解决一些周长 面积的问题(比如 给你很多矩形的位置,让你求他们总共的面积,注意这

1177:奇数单增序列

传送门:http://ybt.ssoier.cn:8088/problem_show.php?pid=1177     【题目描述】 给定一个长度为N(不大于500)的正整数序列,请将其中的所有奇数取出,并按升序输出。 【输入】 第1行为 N; 第2行为 N 个正整数,其间用空格间隔。   【输出】 增序输出的奇数序列,数据之间以逗号间隔。数据保

POJ 1177/HDU 1828 (线段树+扫描线+求周长,注意有重边的情况)

Sample Input: 7 -15 0 5 10 -5 8 20 25 15 -4 24 14 0 -6 16 4 2 15 10 22 30 10 36 20 34 0 40 16 Sample Output 228 #include<iostream> #include<algorithm> #include<cstring> #include<cmath> #define io ios::sync_with_stdio(false)

POJ - 1177 线段树

POJ - 1177 扫描线 这道题也算是一道扫描线的经典题目了。 只不过这道题是算周长,非常有意思的一道题。我们已经知道了,一般求面积并,是如何求的,现在我们要把扫描线进行改造一下,使得能算周长。 我们大致考虑一下图像上是如何实现的: 这样一个图我们要如何求他的面积?     我们把轮廓画