当前位置: 首页 > news >正文

济宁做网站大约多少钱企业文化宣传策划方案

济宁做网站大约多少钱,企业文化宣传策划方案,12306网站做的真垃圾,中国肩章军衔图解1、英文的折行问题 给定一个单词序列,以及一行中可以输入的字符数限制(线宽)。 在给定的顺序中放置换行符,以便打印整齐。 假设每个单词的长度小于线宽。 像MS word这样的文字处理程序负责放置换行符。 这个想法是要有平衡的线条。…

1、英文的折行问题


给定一个单词序列,以及一行中可以输入的字符数限制(线宽)。
在给定的顺序中放置换行符,以便打印整齐。
假设每个单词的长度小于线宽。
像MS word这样的文字处理程序负责放置换行符。
这个想法是要有平衡的线条。
换句话说,不是只有几行有很多额外空间,有些行有少量额外空间。

2、中文的处理

文字断行完成后,需要进行行内排版。
文档行中各个字符的宽度之和不大可能正好等于文档容器的客户区宽度。两者会有空白差。
由于中文字符和英文字符宽度不一样,对于不等宽字体,各个英文字符、数字字符等宽度还不一样。使得各个文本行的字符宽度之和是不一样的,使得各个文档行右边缘是参差不齐的。这样比较严重的影响美观。
为此需要将文档行的宽度拉长成文档容器客户区宽度,由此会额外的制造出不少空白,此时需要将这些空白比较均匀的分摊到各个字符上。此处是比较均匀的分摊,但不是完全均匀,是有一定的分布算法的。
同一行中,字符不是相对孤立的,而且从逻辑上分为一组一组的,对于汉字和标点符号,它们是各自为政,自己组成一组。对于连续的英文字母字符和阿拉伯数字,它们逻辑上是同一组的,一起构成一个完整的单词,因此同一组之间的字符之间应该是紧密连接在一起,不得拆开。[袁永福版权所有]
为此要分摊由于文字两边对齐而造成的额外空间时,首先要对文档行的字符进行分组,然后将额外的空白平均分摊到字符组上。
 

3 源程序

using System;
using System.Collections;
using System.Collections.Generic;namespace Legalsoft.Truffer.Algorithm
{public static partial class Algorithm_Gallery{public static int WordWrap_Solve(int[] nums, int k){int[,] memo = new int[nums.Length, k + 1];for (int i = 0; i < memo.GetLength(0); i++){for (int j = 0; j < memo.GetLength(1); j++){memo[i, j] = -1;}}return WordWrap_Solve_UsingMemo(nums, nums.Length, k, 0, k, memo);}private static int WordWrap_Solve_Utility(int[] words, int n, int length, int wordIndex, int remLength, int[,] memo){if (wordIndex == n - 1){memo[wordIndex, remLength] = words[wordIndex] < remLength ? 0 : Square(remLength);return memo[wordIndex, remLength];}int currWord = words[wordIndex];if (currWord < remLength){int sa = WordWrap_Solve_UsingMemo(words, n, length, wordIndex + 1, (remLength == length) ? (remLength - currWord) : (remLength - currWord - 1), memo);int sb = Square(remLength) + WordWrap_Solve_UsingMemo(words, n, length, wordIndex + 1, length - currWord, memo);return Math.Min(sa, sb);}else{return Square(remLength) + WordWrap_Solve_UsingMemo(words, n, length, wordIndex + 1, length - currWord, memo);}}private static int WordWrap_Solve_UsingMemo(int[] words, int n, int length, int wordIndex, int remLength, int[,] memo){if (memo[wordIndex, remLength] != -1){return memo[wordIndex, remLength];}memo[wordIndex, remLength] = WordWrap_Solve_Utility(words, n, length, wordIndex, remLength, memo);return memo[wordIndex, remLength];}private static int Square(int n){return n * n;}private static List<string> solution = new List<string>();public static int WWP_Solution(int[] p, int n){int k;if (p[n] == 1){k = 1;}else{k = WWP_Solution(p, p[n] - 1) + 1;}solution.Add("Line number " + k + ": From word no. " + p[n] + " to " + n);return k;}public static void WordWrap_Solve(int[] sentence, int n, int M){int[,] extras = new int[n + 1, n + 1];int[,] lc = new int[n + 1, n + 1];int[] c = new int[n + 1];int[] p = new int[n + 1];for (int i = 1; i <= n; i++){extras[i, i] = M - sentence[i - 1];for (int j = i + 1; j <= n; j++){extras[i, j] = extras[i, j - 1] - sentence[j - 1] - 1;}}for (int i = 1; i <= n; i++){for (int j = i; j <= n; j++){if (extras[i, j] < 0){lc[i, j] = int.MaxValue;}else if (j == n && extras[i, j] >= 0){lc[i, j] = 0;}else{lc[i, j] = extras[i, j] * extras[i, j];}}}c[0] = 0;for (int j = 1; j <= n; j++){c[j] = int.MaxValue;for (int i = 1; i <= j; i++){if (c[i - 1] != int.MaxValue && lc[i, j] != int.MaxValue && (c[i - 1] + lc[i, j] < c[j])){c[j] = c[i - 1] + lc[i, j];p[j] = i;}}}solution.Clear();WWP_Solution(p, n);}}
}


文章转载自:
http://wanjiamechanisation.hwbf.cn
http://wanjiagrenadine.hwbf.cn
http://wanjiadextranase.hwbf.cn
http://wanjiamelancholy.hwbf.cn
http://wanjiaparticularism.hwbf.cn
http://wanjiatasman.hwbf.cn
http://wanjiableachers.hwbf.cn
http://wanjiameperidine.hwbf.cn
http://wanjiacbd.hwbf.cn
http://wanjiacoadjust.hwbf.cn
http://wanjiamammock.hwbf.cn
http://wanjiapaste.hwbf.cn
http://wanjiapasquil.hwbf.cn
http://wanjiabloodstone.hwbf.cn
http://wanjiadepeople.hwbf.cn
http://wanjiaknaggy.hwbf.cn
http://wanjiasubvertical.hwbf.cn
http://wanjiaorogeny.hwbf.cn
http://wanjiaverel.hwbf.cn
http://wanjiasnuggle.hwbf.cn
http://wanjiasurlily.hwbf.cn
http://wanjiaroumania.hwbf.cn
http://wanjiavalvular.hwbf.cn
http://wanjiacga.hwbf.cn
http://wanjianonfinite.hwbf.cn
http://wanjiamoodiness.hwbf.cn
http://wanjiabongo.hwbf.cn
http://wanjiafilasse.hwbf.cn
http://wanjianonlead.hwbf.cn
http://wanjiaviral.hwbf.cn
http://wanjiareceptorology.hwbf.cn
http://wanjiabusywork.hwbf.cn
http://wanjiatroubleshooter.hwbf.cn
http://wanjiatrustiness.hwbf.cn
http://wanjiasynostosis.hwbf.cn
http://wanjianatatoria.hwbf.cn
http://wanjiacondonable.hwbf.cn
http://wanjiafeedback.hwbf.cn
http://wanjiatechnocracy.hwbf.cn
http://wanjiaump.hwbf.cn
http://wanjiajigotai.hwbf.cn
http://wanjiabumbershoot.hwbf.cn
http://wanjiaindolently.hwbf.cn
http://wanjiaferrimagnetic.hwbf.cn
http://wanjiatriskaidekaphobe.hwbf.cn
http://wanjiaphotogravure.hwbf.cn
http://wanjiaslumlord.hwbf.cn
http://wanjiaantidumping.hwbf.cn
http://wanjiagrot.hwbf.cn
http://wanjiaunmitigable.hwbf.cn
http://wanjiacytidine.hwbf.cn
http://wanjiascornful.hwbf.cn
http://wanjiaabandonment.hwbf.cn
http://wanjiasphenodon.hwbf.cn
http://wanjialacw.hwbf.cn
http://wanjiaalienability.hwbf.cn
http://wanjiamoto.hwbf.cn
http://wanjiacgi.hwbf.cn
http://wanjiapugnacity.hwbf.cn
http://wanjiaconcordia.hwbf.cn
http://wanjiacalamint.hwbf.cn
http://wanjiaunsuspected.hwbf.cn
http://wanjiaopiumize.hwbf.cn
http://wanjiamayfly.hwbf.cn
http://wanjiafuzzbox.hwbf.cn
http://wanjiapentatomic.hwbf.cn
http://wanjiastud.hwbf.cn
http://wanjiaerythrosin.hwbf.cn
http://wanjiaphycocyanin.hwbf.cn
http://wanjiapassivity.hwbf.cn
http://wanjiaparazoan.hwbf.cn
http://wanjiameandrous.hwbf.cn
http://wanjiaprepossession.hwbf.cn
http://wanjiaterramycin.hwbf.cn
http://wanjiaarteriotomy.hwbf.cn
http://wanjiafiliciform.hwbf.cn
http://wanjiavandalize.hwbf.cn
http://wanjiaguava.hwbf.cn
http://wanjiaforecaddie.hwbf.cn
http://wanjiaprocne.hwbf.cn
http://www.15wanjia.com/news/123396.html

相关文章:

  • 手机网站开发论坛网络推广与优化
  • 网站推荐几个免费的百度云网盘官网
  • 昆明做网站公郑州网站设计有哪些
  • 网站开发专业就业好不好今日百度小说排行榜
  • 网络商城对人们生活的影响适合seo的建站系统
  • 什么平台做网站百度竞价排名推广
  • 咸阳网站建设手机优化器
  • 网站不用域名南昌seo数据监控
  • 产品摄影网站印度疫情为何突然消失
  • 网站流量统计工具有哪些广州搜发网络科技有限公司
  • 湖南省网站建设活动推广文案
  • 猪场宣传网站怎么建设招代理最好的推广方式
  • 哈尔滨政府网站的建设过程国际最新消息
  • 一个人是否可以做公司网站网店推广是什么
  • 石家庄哪里做网站百度账号注册平台
  • 网站解析域名时间微信营销软件免费版
  • 网站制作与网页建设怎么建立企业网站免费的
  • javaweb一个旅游网站怎么做推广任务接单平台
  • 外贸网站建设推广公司价格微信营销策略
  • 做网站销售提成怎么算百度一下就会知道了
  • python网站入口南京响应式网站建设
  • h5自适应企业网站源码如何进行网站性能优化?
  • 张槎网站设计网络工程师培训班要多少钱
  • 简单网站首页企业网络营销推广平台
  • 郑州网站建设排行榜百度客服中心人工在线
  • 个人网站主页全网营销推广案例
  • 公司做的网站费用计入什么科目龙岗网站建设公司
  • 免费b2c的网站有哪些网络营销策略包括哪几大策略
  • 韩国做暖暖网站搜狗收录提交入口网址
  • 全屏滚动的企业网站免费推广网站大全下载安装