现在位置: 首页 > SeldBetleGady发表的所有文章
  • 09月
  • 23日
综合 ⁄ 共 2485字 评论关闭
一、问题描述 输入一组浮点数,求出这个浮点数组最大乘积的连续子串。举个例子,浮点数组为str[]={-3,-5,0,-1,-2,-2},这时得出来的结果是前两个浮点数的乘积,即15。需要注意的是,这个子串是要求连续的,另外,子串的长度可以为1. 二、问题分析 这里给出两种思路,后续可能还会加入新的思路。 第一种是直接求解。即用双层循环。外面一层是从1到浮点数组的长度,里面的那层循环是当前的位置加1一直到浮点数组的结束,里面的循环来算所有的乘积。换句话说就是,内层循环每次从i+1开始到浮点数组结束的乘积,这些乘积是str[i]*st......
阅读全文
  • 04月
  • 28日
综合 ⁄ 共 44字 评论关闭
十六宫格  8 11 m-20 1  m-21 2 7 12  3 m-18 9 6  10 5 4 m-19  则和为m
阅读全文
  • 04月
  • 18日
综合 ⁄ 共 2182字 评论关闭
  最近临近毕业,准备走人,闲来刷下题。挺有意思的字符串题目,先Trie后DFS。将模式串组成Trie,然后上面跑DFS。   易错的地方几个(惭愧地参考了别人的心得才发现),模式串有可能有一模一样的,所以DFS时必须都找出来。   import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Trie trie = new Trie(); int m,n; m = scan.nextInt(); n = scan.nextInt(); for(int i=0;i<m;i++) { String tmpStr = scan.......
阅读全文
  • 12月
  • 29日
综合 ⁄ 共 1238字 评论关闭
最小树形图,,不熟练啊,写错几个地方无限TLE           #include<stdio.h> #include<string.h> #include<math.h> #define N 101 #define inf 0x3fffffff int flag[N],id[N],pre[N],n,m; double ms[N]; struct op { int x,y; double w; }e[N*N]; struct tp { double x,y; }p[N]; double dis(struct tp a,struct tp b) { return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)); } double liuzhu(int root) { int i,j,nm=n+1; double sum=0; while(1) { memset(flag,-1,siz......
阅读全文
  • 08月
  • 10日
综合 ⁄ 共 3831字 评论关闭
  一、软件产品质量的特点     按照ISO 9126的定义,软件的质量通常可以从以下六个方面去衡量(定义)  ·功用性(Functionality),即软件是否满足了客户功能要求;  ·可靠性(Reliability),即软件是否能够-直在-个稳定的状态上满足可用性;  ·可用性(Usability),即衡量用户能够使用软件需要多大的努力;  ·效率(Efficiency),即衡量软件正常运行需要耗费多少物理资源;  ·可维护性(Maintainability),即衡量对已经完成的软件进行调整需要多大的努力;  ·可移植性(Portability),即衡量软件是否能够方便地部署到不同的运行环境中。 ......
阅读全文
  • 05月
  • 16日
综合 ⁄ 共 876字 评论关闭
所谓的职业生涯,其实你很难预测到你将来真正要从事什么工作,将来所要从事的工作,是否跟你在大学里学的专业有关。大多数人,很有可能将来所作的工作,跟他当初所学的专业一点关系都没有。从22岁大学毕业在26岁之间这四年,重要的不是你做了什么,重要的是你在工作中养成了怎么样的良好的工作习惯。这个良好的工作习惯,指的是:认真,踏实的工作作风,以及是否学会了如何用最快的时间接受新的事物,发现新事物的内在规律,比别人更短时间内掌握这些规律并且处理好它们。具备了以上的要素,你就成长为一个被人信任的工作的人。  ......
阅读全文
  • 05月
  • 06日
综合 ⁄ 共 486字 评论关闭
假设现在News表有以下字段 News_Id,News_Title,News_IsSetTop,News_SetTopTime 其中News_IsSetTop(char(1))是“是否置顶”的含义;News_SetTopTime(DateTime)是置顶时间; 现在要实现:如果News_IsSetTop为"1"时 ,ORDER BY News_IsSetTop DESC,News_Id DESC;News_IsSetTop为"0"时,ORDER BY News_ID DESC 经过反复的试验,终于解决了这个问题: select  news_id,news_issettop,news_settoptime  from  hope_T_news order by  (case when news_issettop=’0′ then news_issettop when news_issettop=’1′ and news_settoptime>ge......
阅读全文
  • 05月
  • 03日
综合 ⁄ 共 1294字 评论关闭
The 2014 ACM-ICPC Asia Mudanjiang Regional First Round - A The Himalayas Time Limit: 2 Seconds      Memory Limit: 65536 KB As an artist, Bob usually need to travel around the world. He made a lot of sketch of scenery on his journey. A famous spot he have visited recently is the Himalayas. The Himalayas is a mountain range in South Asia separating the plains of the Indian subcontinent from the Qinghai-Tibet Plateau. The Himalayas include over a hundred mountains exceeding 7,200 meters......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 2394字 评论关闭
Eddy's picture Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6929    Accepted Submission(s): 3499 Problem Description Eddy begins to like painting pictures recently ,he is sure of himself to become a painter.Every day Eddy draws pictures in his small room, and he usually puts out his newest pictures to let his friends appreciate. but the result it can be imagined, the friends are not interested in his picture.Eddy feels very puzz......
阅读全文
  • 03月
  • 31日
综合 ⁄ 共 1863字 评论关闭
    准备一张名为picture的图片。     在main.xml中:   <LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:background="#000000"     android:orientation="vertical"     android:gravity="center_horizontal">   <ImageView       android:id="@+id/mlyw"       android:layout_marginTop="8dp"       android:layout_width="fill_parent"       android:layout_height="wrap_content"   ......
阅读全文
  • 02月
  • 09日
综合 ⁄ 共 1123字 评论关闭
对于很多人用div来做网站时,总会用到,但在显示效果时前面总是会有一个小黑点,这个令很多人头痛,但又找不到要源,其它我们可以用以下方法来清除。 1、在CSS中写入代码。找到相关性的CSS,在。.li和.ul下写入list-sytle:none;当然有的会这样来写list-style-type:none, 这种写法特别是在一些CMS中最常见。 2、在相关的页面找到head部分写入下面的代码 <style type="text/css"> list-style:none; </style> 3、在li,ul内加入list-style。如<ul style="list-style-type:none><li><a herf="http://b......
阅读全文
  • 02月
  • 06日
综合 ⁄ 共 1138字 评论关闭
For matrix construction, the language is very flexible. These basic rules describe how matrices can be constructed: • If only one scalar argument is provided to a matrix constructor, that value is placed in the diagonal of the matrix. For example mat4(1.0) will create a 4 × 4 identity matrix. • A matrix can be constructed out of multiple vector arguments, for example a mat2 can be constructed from two vec2s. • A matrix can be constructed out of multiple scalar arguments, one for each valu......
阅读全文