现在位置: 首页 > unfolding发表的所有文章
  • 11月
  • 06日
综合 ⁄ 共 2837字 评论关闭
D. R2D2 and Droid Army time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output An army of n droids is lined up in one row. Each droid is described by m integers a1, a2, ..., am, where ai is the number of details of thei-th type in this droid's mechanism. R2-D2 wants to destroy the sequence of consecutive droids of maximum length. He has m weapons, the i-th weapon can affect all the droids in the army by destroying one de......
阅读全文
  • 09月
  • 12日
综合 ⁄ 共 1442字 评论关闭
举个例子: 类A的声明与实现如下: #pragma once class A { public: int count1; //static int count2=100;//error ,带有类内初始值设定项的成员必须为常量 //const static int count3=100;//正确 static int count2; public: int getCount1(); static int getCount2(); public: A(void); ~A(void); }; #include "stdafx.h" #include "A.h" A::A(void):count1(99) { } A::~A(void) { } int A::getCount1() { return count1; }; //static int A::getCount2()//error,此处不能指定存储类,即类体外来......
阅读全文
  • 08月
  • 21日
综合 ⁄ 共 2453字 评论关闭
Contestants Division Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8119   Accepted: 2318 Description In the new ACM-ICPC Regional Contest, a special monitoring and submitting system will be set up, and students will be able to compete at their own universities. However there’s one problem. Due to the high cost of the new judging system, the organizing committee can only afford to set the system up such that there will be only one way to transfer information fr......
阅读全文
  • 02月
  • 12日
综合 ⁄ 共 1150字 评论关闭
给定前序遍历和中序遍历,写出后序遍历。 #include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <string> #include <cmath> #include <assert.h> #include <algorithm> #define MAX 1234567890 #define MIN -1234567890 #define eps 1e-8 using namespace std; char bef[32]; char mid[32]; char aft[32]; char tree[1024]; bool visit[32]; int len; int p; void build(char root, int t) { int i, j; tree[t] = root; ......
阅读全文
Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately to get out of this maze. The maze was a rectangle with sizes N by M. There was a door in the maze. At the beginning, the door was closed and it would open at the T-th second for a short period of time (less than 1 second). Therefore th......
阅读全文
  • 01月
  • 05日
综合 ⁄ 共 253字 评论关闭
The connection to adb is down, and a severe error has occured. You must restart adb and Eclipse. Please ensure that adb is correctly located at 'E:\setups\android\android-2.1_r01-windows\tools\adb.exe' and can be executed. 解决办法:查看任务管理器,关闭所有adb.exe,任务管理器关闭豌豆荚进程,重启eclipse就好了重启eclipse即可
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 1134字 评论关闭
如今的屏幕分辨率,小至320px(iPhone),大到2560px甚至更高(大显示器),变化范围极大。除了使用传统的台式机,用户会越来越多的通过手机、上网本、iPad一类的平板设备来浏览页面。这种情况下,固定宽度的设计方案将会显得越发不合理。页面需要有更好的适应性,其布局结构要做到根据不同的设备及屏幕分辨率进行响应调整。接下来,我们将了解一下怎样通过html5和css3 Media Queries(媒介查询)相关技术来实现跨设备跨浏览器的响应式web设计方案。 media query的浏览器支持: IE 9以下不支持 Firefox 3.5+(Gecko 1.9.1+)支持 O......
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 306字 评论关闭
GIS 行迹博客  -- geoshttp://blog.csdn.net/hengcai001/article/details/4452614 JTS 拓扑套件官方api说明 http://tsusiatsoftware.net/jts/javadoc/index.html GEOS 官方API http://geos.osgeo.org/doxygen/ http://www.blogjava.net/sinoly/category/19447.html GIS缓冲区算法对比研究(Buffer Algorithm) http://blog.csdn.net/qq503690160/article/details/7055203
阅读全文
  • 05月
  • 26日
综合 ⁄ 共 3211字 评论关闭
目前在通过《Header First Python》学习Python语言。 其中有几个章节介绍Python在web和移动设备上的开发,移动设备OS选用了现在火热的Android。 对于这个系统,之前我只听说过,从未实际使用过;移动设备上程序的编写,也是第一次涉足。 下面记录的搭建环境的过程及相关要点,希望对刚接触这方面的朋友有所帮助。   环境 OS: Windows XP 32bit SP3 移动设备: Android模拟器   安装调试过程 如果完全从0开始,请阅读所有Step。如果只是想知道如何远程调试,请直接阅读Step5。 Step1 : PC上安装Python 下载Python 目前......
阅读全文
  • 05月
  • 18日
综合 ⁄ 共 619字 评论关闭
环境 学校里上网使用的是Dr.com客户端 在VMware中安装了Linux虚拟机,作为学习用的服务器 主机上装的是win7,有一块有线网卡和一块无限网卡,虚拟机上没有设置无限网络(服务器一般也不需要无线网络) 需求 需要用putty客户端通过ssh连接linux虚拟机,通过ftp向linux上传文件 win7连接linux同时还需要上网查资料 方法1 通过路由器: 之前用一个D-Link的DIR-110路由器来上网,设置DIR-110的Wan端口为校园网的一个可用的静态IP(我们学校有一部分子网是静态ip) 设置虚拟机的网卡为桥接方式,这样,在主机上通过web登录Dr.com之后,......
阅读全文
  • 04月
  • 24日
综合 ⁄ 共 1932字 评论关闭
#include<iostream> #include<cstring> #include<cstdio> #define inf 0x7fffffff using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } struct edge{ int to,next,v; }e[50001]; int r,c,d,cnt=1,ans,T=801,mp[21][21],mark[21][21],head[50001],h[50001]; bool judge(int x1,int y1,int x2,int y2){ if((......
阅读全文
  • 04月
  • 15日
综合 ⁄ 共 4255字 评论关闭
from: http://www.phppan.com/2011/02/php-socket/   PHP的Socket编程 计算机进程可以使用socket和其他进程通信,通过socket,其他进程的位置是透明的。这些进程可以在同一台计算机上也可以在不同的计算机上。 在PHP中,socket是以扩展的方式加载的,如果无法使用socket相关函数,请确认是否有打开此扩展。 下面我们以一个面向连接的客户端和服务器的简单实现说明一些函数的使用,在此之后,简单介绍在PHP的内部是如何实现这些函数的。 【客户端实现】 如下所示代码为客户端的实现代码: set_time_limit ( 0 ) ;  $hos......
阅读全文