题意是这样,给出一个运算符只有+跟*,数字都在1到9之间的算式,要你加入一对括号,使得算式的结果尽可能的大,保证最多十五个乘号。
很显然,若要让加入的括号能够影响原本运算的结果,必然是要影响乘法,那么加入的这对括号中必然至少有一个跟乘号是相邻的,恰好乘号的数目很小,那么直接枚举括号的位置即可,每次算出当前解更新ans即可。
#include
#include
#include
#include...
分类:
其他好文 时间:
2015-07-20 23:35:33
阅读次数:
153
poj 1141 Brackets Sequence基础的区间dp题,注意dp边缘的初始化,以及递归过程中的边界
分类:
其他好文 时间:
2015-07-19 14:49:12
阅读次数:
73
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the ...
分类:
其他好文 时间:
2015-07-19 00:01:23
阅读次数:
292
一、手动安装:1、 Emmet (ex-Zen Coding) for Sublime Text http://emmet.io (1) 下载:https://github.com/sergeche/emmet-sublime#readme (2) 打开Sublime Text 3,选择菜...
分类:
其他好文 时间:
2015-07-18 02:02:34
阅读次数:
116
Emmet插件以前被称作为Zen Coding,是一个文本编辑器的插件,它可以帮助您快速编写HTML和CSS代码,从而加速Web前端开发。早在2009年,Sergey Chikuyonok写过一篇文章,提出编写HTML和CSS的新方法。这一革命性的插件指的就是Zen Coding,经过很多开发者多年...
分类:
Web程序 时间:
2015-07-17 20:18:05
阅读次数:
275
在sublime 中,促发emmet 可以先保存为.html文件。然后输入下面的简写,按tab键就可促发效果了。1. 生成html格式输入 html:52. 简写Div大家可以看到,不管你是否添加了div,Emmet都会自动生成需要div元素。含糊标签名称这个技巧属于implicit tag nam...
分类:
其他好文 时间:
2015-07-17 00:02:05
阅读次数:
174
'alert' or 'console' was used before it was defined. How to resolve?add two lines:/*jslint browser: true *//*jslint browser: true, devel: true */xxxxx...
分类:
其他好文 时间:
2015-07-15 14:36:14
阅读次数:
87
参考文章:http://www.cnblogs.com/sussski/p/3544744.htmlhtml:4s、html:4t、html:5或!+、>、^:层次*、@-、@3:个数、排序及起始值$:填充[]:属性{}:内容#、. :id和class
分类:
其他好文 时间:
2015-07-15 12:48:10
阅读次数:
122
题目链接:https://leetcode.com/problems/valid-parentheses/
Given a string containing just the characters '(', ')','{', '}', '[' and ']',
determine if the input string is valid.
The brackets m...
分类:
其他好文 时间:
2015-07-14 15:37:03
阅读次数:
109
Sublime Text作为一款轻量、简洁、高效、跨平台的编辑器。支持N多种语言,受工程师所爱!这里教大家如何安装破解Sublime Text 2.0.2,并教大家如何安装包控制器(package control)和安装插件(Emmet、SublimeLinter、jQuery等插件)工具/原料Su...
分类:
其他好文 时间:
2015-07-14 13:01:54
阅读次数:
216