在进行数据库操作时,如还原数据库,有时候显示如下错误Exclusive access could not be obtained because the database is in use 可以使用下面语句,关闭当前链接以便继续操作。 use Master ALTER DATABASE yourd...
分类:
数据库 时间:
2014-08-11 11:33:22
阅读次数:
241
解决方案:进入apache的安装目录:#vim/etc/httpd/conf/httpd.conf将其中一行#ServerNamelocalhost:80注释#号去掉即可。再重启服务httpd即可。
分类:
其他好文 时间:
2014-08-11 10:22:33
阅读次数:
189
题目链接
题意:n个司机,n个下午路线和n个夜间的行驶时间。每个司机恰好分配到一个下午路线和一个夜间路线。司机行驶如果超过规定的行驶总时间,每个单位时间要多付给司机r元,求最小要给所有司机的加班费。
思路:贪心,将两个时间段的行驶时间排序,然后依次取最大和最小相加减去规定时间。那么超过的时间将最小,加班费也会最小。
#include
#include
#include
#...
分类:
其他好文 时间:
2014-08-10 21:36:00
阅读次数:
284
const int MAX=1010; //元素个数的最大值,根据题目修改int p[MAX];void init(int n) //n为实有元素个数{ for (int i=1; i<=n; i++) p[i]=i; }int find(int x) //查找{ if (x==p[x]) retu...
分类:
其他好文 时间:
2014-08-10 21:21:50
阅读次数:
258
Problem Description
A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.
You are to find all the hat’s words in a dictionary....
分类:
其他好文 时间:
2014-08-10 18:40:10
阅读次数:
232
在 android 的API中有提供 SystemClock.setCurrentTimeMillis()函数来修改系统时间,可惜无论你怎么调用这个函数都是没用的,无论模拟器还是真机,在logcat中总会得到"Unable to open alarm driver: Permission denie...
分类:
移动开发 时间:
2014-08-10 18:33:50
阅读次数:
346
Description
Problem A
Expression Bracketing
Input: standard input
Output: standard output
Time Limit: 1 second
Memory Limit: 32 MB
Inthis problem you will have to find in how many ways
...
分类:
其他好文 时间:
2014-08-10 15:47:00
阅读次数:
247
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2014-08-10 15:33:50
阅读次数:
166
O(n) complexity, have a traversal for the tree. Get the information of all children, then traverse the tree again.
#include
#include
#include
#include
using namespace std;
class Node {
pub...
分类:
其他好文 时间:
2014-08-10 13:00:30
阅读次数:
238
Find Metal MineralTime Limit: 1000msMemory Limit: 65768KBThis problem will be judged onHDU. Original ID:400364-bit integer IO format:%I64d Java class ...
分类:
其他好文 时间:
2014-08-10 12:42:00
阅读次数:
230