题目链接:hdu 3642 Get The Treasury
题目大意:三维坐标系,给定若干的长方体,问说有多少位置被覆盖3次以上。
解题思路:扫描线,将第三维分离出来,就是普通的二维扫描线,然后对于每个节点要维护覆盖0,1,2,3以上这4种的覆盖面积。
#include
#include
#include
#include
using namespace std;
co...
分类:
其他好文 时间:
2014-10-12 11:21:27
阅读次数:
323
需求:输入用户名和密码,认证成功后显示欢迎信息,输错三次后锁定shell:#!/bin/bash
#Authuserlogin
user="hlf"
pass="123456"
lock_file=login.lock
[-f${lock_file}]||touch${lock_file}
foriin`seq3`
do
read-p"username:"username
read-p"password:"password
if[-z"$u..
分类:
其他好文 时间:
2014-10-12 11:07:18
阅读次数:
168
问题: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:
其他好文 时间:
2014-10-12 00:58:36
阅读次数:
686
下面例子展示批量插入一个反模式(不成熟使用Hibernate插入100000行记录) ?Session session = sessionFactory.openSession(); ?Transaction tx = session.beginTransaction(); ?for ( int i=0; i<100000; ...
分类:
其他好文 时间:
2014-10-11 19:40:17
阅读次数:
231
数据备份是数据库管理员非常重要的工作。系统意外崩溃、磁盘损坏等都有可能导致数据丢失,所以要定期的备份数据库。现有三种方法备份数据库。要想保持备份的一致性,备份前要对相关表执行LOCKTABLES操作,然后对表执行FLUSHTABLES。FLUSHTABLES语句来确保开始将所有激活的索引..
分类:
数据库 时间:
2014-10-11 19:20:56
阅读次数:
188
svnsync同步的时候,过了一夜,第二天不动了,就关闭了程序,在同步就出现了标题中的问题,搜索解决办法:删除SVN仓库修订号0svn:sync-lock的保护.svnpropdelsvn:sync-lock--revprop-r0svn://10.1.1.209/然后在同步就可以了
分类:
其他好文 时间:
2014-10-11 18:24:36
阅读次数:
219
严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections co...
分类:
数据库 时间:
2014-10-11 17:08:35
阅读次数:
342
http://www.mindscapehq.com/products/metroelements常见的翻书,相册,图表,时间组件demo下载地址http://assets.mindscape.co.nz/Downloads/MetroElementsTrial.msihttp://www.evge...
第一步:引入依赖的jar包<!--jersey--><dependency><groupId>com.sun.jersey</groupId><artifactId>jersey-client</artifactId><version>${jersey.version}</version></dependency><dependency><groupId>co..
分类:
编程语言 时间:
2014-10-11 16:05:46
阅读次数:
183
<?xml?version="1.0"?encoding="UTF-8"?>
<beans?xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"?xmlns:tx="http://www.springframework.or...
分类:
编程语言 时间:
2014-10-11 12:03:55
阅读次数:
160