现在位置: 首页 > gjjipxcy发表的所有文章
  • 11月
  • 08日
综合 ⁄ 共 747字 评论关闭
首先排个序,然后找一次0花费,然后再找一次0花费,然后再找一次0花费,然后再找一次0花费......... 最后看找了几次,+1就是答案 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cstdlib> #include<vector> using namespace std; struct node { int l,w; friend istream & operator >>(istream &is,node &a) { is>>a.l>>a.w; return is; } }; bool cmp(node a,node b) { return a.l!=......
阅读全文
  • 07月
  • 19日
综合 ⁄ 共 3575字 评论关闭
在计算机领域,通常用Endian和Endianness指出在计算机的存储器中字节是怎样组织的。 Endian有如下的三种模式: (1)Big Endian (2)Little Endian (3)Mixed(Middle) Endian Examples of storing the value 0A0B0C0Dh in memory Note that hexadecimal notation is used. To illustrate the notions this section provides example layouts of the 32-bit number 0A0B0C0Dh in the most common variants of endianness. There exist several digital processors that use other formats, but these two are the most common......
阅读全文
  • 05月
  • 17日
综合 ⁄ 共 856字 评论关闭
下载相应的rom刷机包 确认手机能用usb数据线正常的连接电脑 手机里必须安装第三方的recovery 手机必须处于UNLOCK状态,若不是可用刷机精灵,卓大师,刷机大师等解锁 (1) 第一步,装驱动。连接电脑,在设备管理器里把手机的驱动装上。相信大家应该都已经会了,这里就不多说了。           第二步,官解。用HTC一键解锁工具进行官解(即官方解锁,到现在没想明白为什么官方解锁还影响售后,所以这里提醒下,请确认手机无质量问题后再进行官解),这个也很简单,去巴士下载,绿色版,直接运行,然后猛搓“一键解锁”......
阅读全文
  • 04月
  • 17日
算法 ⁄ 共 1415字 评论关闭
两种解法,其中一种是用单调栈。 我想到的是另外一种:最大的矩形,中间一定有个最矮的某个单位矩形,所以求出每个包含矩形histogram[i]的最大矩形的面积,输出这些面积中最大那个即可。 key:用两个数组记录histogram[i]左右两边第一个比它小的单位矩形的序号leftLowerId[i]和rightLowerId[i],那么对于histogram[i],它自己的最大矩形面积就是(rightLowerId[i] - leftLowerId[i] - 1) *  histogram[i]。   这里找leftLowerId和rightLowerId的时候用DP加速。以rightLowerId为例,找到右边比histogram[i]矮的矩形,停止,遇到比his......
阅读全文
  • 04月
  • 02日
算法 ⁄ 共 686字 评论关闭
思路见前一文,上一种做法中,内存差一点就超了,改进了一下,因为求LCS时,只用到了表的两行,所以可以进行空间压缩 //196K    797MS #include <stdio.h> #include <string.h> #define M 5002 short int c[2][M]; char s1[M],s2[M]; int Max (int a,int b) {     return a > b ? a : b; } int DP (int n) {     int i,j,k;     for (i = 0; i <= n; i ++)         c[0][i] = 0;     k = 1;     for (i = 1; i <= n; i ++)     {         for (j = 1; j <= n; j ++)             if (s1[i] == s2[j]) ......
阅读全文
  • 09月
  • 13日
综合 ⁄ 共 2064字 评论关闭
1 package test; 2 3 import java.awt.Container; 4 import java.awt.GridLayout; 5 import java.awt.event.WindowAdapter; 6 import java.awt.event.WindowEvent; 7 import java.io.File; 8 import java.util.Vector; 9 10 import javax.swing.BorderFactory; 11 import javax.swing.ComboBoxEditor; 12 import javax.swing.ImageIcon; 13 import javax.swing.JCheckBox; 14 import javax.swing.JComboBox; 15 import javax.swing.JFrame; 16 import javax.swing.JLabel; 17 import javax.swing.JMenu; 18 import jav......
阅读全文
    今天发布iOS app到AppStore时,上传App icon,网页提示错误(image can't contain alpha channels or transparencies),网上查了一下,发现Apple官方对App icon上传设置了新的规定,以前都是上传PNG图片就OK了。现在需要将PNG图片用预览打开导出一下生成JPEG格式的图片,然后再上传就可以了。
阅读全文
  • 06月
  • 05日
综合 ⁄ 共 313字 评论关闭
安装MYSQL是出现: error: Failed dependencies:libaio.so.1 is needed by MySQL-server-5.5.31-2.el6.i686libaio.so.1(LIBAIO_0.1) is needed by MySQL-server-5.5.31-2.el6.i686libaio.so.1(LIBAIO_0.4) is needed by MySQL-server-5.5.31-2.el6.i686 原因:libaio依赖没有安装! 解决方案: yum install libaio.so.1 注:最好不要使用 yum install libaio这个命令,明确指出要安装的依赖包,否则有可能依然会提示依赖没有安装。
阅读全文
  • 05月
  • 06日
综合 ⁄ 共 2380字 评论关闭
1、安装boost 1.54,这个步骤网上到处都是,我都是默认安装,安装后的boost路径如下: ywh@linux-ywh:/usr/include/boost> pwd /usr/include/boost 2、安装好vim、llvm_clang、youcompleteme,我的opensuse12.3默认安装的vim不支持python,只能卸载了从源码安装vim74       这几个软件非常麻烦,安装化了好长时间,具体可以参考下:        http://zuyunfei.com/2013/05/16/killer-plugin-of-vim-youcompleteme/        http://www.cnblogs.com/codemood/p/3142848.html 3、这几个都安装完成后就需要配置youcompleteme了(ycm......
阅读全文
  • 04月
  • 15日
综合 ⁄ 共 3086字 评论关闭
首先Java(包括JSP)源文件中很可能包含有中文,而Java和JSP源文件的保存方式是基于字节流的,如果Java和JSP编译成class文件过程中,使用的编码方式与源文件的编码不一致,就会出现乱码。基于这种乱码,建议在Java文件中尽量不要写中文(注释部分不参与编译,写中文没关系),如果必须写的话,尽量手动带参数-ecoding GBK或-ecoding gb2312编译;对于JSP,在文件头加上<%@ page contentType="text/html;charset=GBK"%>或<%@ page contentType="text/html;charset=gb2312"%>基本上就能解决这类乱码问题。   本......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 2251字 评论关闭
简单总结: 1:临时表分为:本地临时表和全局临时表,其实就是临时表可用范围的区别:当前会话连接可用和服务器全局所有用户可用; 2:临时表在数据库服务器重启后,自动消失; 3:SQLSERVER的临时表除了在命名上有特定的标识外,对于临时表的创建、删除等使用和操作与普通表没有什么区别。 SQL SERVER临时表的使用 drop table #Tmp   --删除临时表#Tmp create table #Tmp --创建临时表#Tmp (     ID   int IDENTITY (1,1)     not null, --创建列ID,并且每次新增一条记录就会加1     WokNo                varchar(......
阅读全文
  • 04月
  • 04日
综合 ⁄ 共 2094字 评论关闭
Dijkstra。 #include <stdio.h> #include <string.h> #define CLR(a,v) memset(a,v,sizeof(a)) #define min(a,b) a < b ? a : b #define N 105 #define M 10005 struct Vertex { int head; }V[N]; struct Edge { int v,w,next; }E[M]; int n,m,top,d[N]; bool in[N]; void Init() { CLR(in,false); CLR(d,63); CLR(V,-1); top = 0; } void Add_Edge(int u,int v,int w) { E[top].v = v; E[top].w = w; E[top].next = V[u].head; V[u].head = top++; } void Dijkstra(int s) { int p = s,t = ......
阅读全文