#include
#include
using namespace std;
int max1(int a,int b)
{
return a>b?a:b;
}
int dp[10100];
int main()
{
int n,t,wi[10100],max,p,i,j,s;
while(cin>>n)
{
if(n==0)
{
break;
}
max=-1;
...
分类:
其他好文 时间:
2014-10-27 23:09:14
阅读次数:
249
该脚本实现了对指定进程名的进程进行每隔2的扫描监控,一旦发现进程不存在便重新启动。
#!/bin/sh
a=10;
while [[ @a -gt 5 ]]; do
if test $(pgrep -f $1|wc -l) -eq 2;then
sh stop.sh
gnome-terminal -x sh start.sh ...
分类:
系统相关 时间:
2014-10-27 23:07:32
阅读次数:
332
1 class Solution { 2 public: 3 //计算一个整数的位数,在溢出判断中使用 4 int bit_length(int n) { 5 int l=0; 6 while(n!=0)...
分类:
其他好文 时间:
2014-10-27 22:55:56
阅读次数:
113
1 class Solution 2 { 3 public: 4 5 int reverse(int x){ 6 int result=0; 7 while(x!=0) 8 { 9 ...
分类:
其他好文 时间:
2014-10-27 22:55:25
阅读次数:
165
1.求下面函数的返回值( 微软)Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->int func(x) { int countx =0; while(x...
分类:
编程语言 时间:
2014-10-27 22:48:41
阅读次数:
299
#include
#include
using namespace std;
int dp[10010];
int max(int a,int b)
{
return a>b?a:b;
}
int main()
{
int n,v,vi[10100],wi[10100],i,j;
while(cin>>n>>v)
{
memset(vi,0,sizeof(vi));
memset(...
分类:
其他好文 时间:
2014-10-27 21:21:34
阅读次数:
214
【题意简述】:给定两个字符串s和t,判断s是否是t的子串。长度不超过100000.
【分析】:简单的模拟吧。。
// 368K 16Ms
#include
#include
using namespace std;
int main()
{
int i,j;
char s[100000],t[100000];
while(cin>>s>>t)
{
long len1 = str...
分类:
其他好文 时间:
2014-10-27 19:33:12
阅读次数:
171
add mail.jar and activation.jar in ANT_HOME/lib or use both jar form your project/lib问题描述: ant执行发送email的功能时报错:java.lang.ClassNotFoundException: javax....
分类:
编程语言 时间:
2014-10-27 19:22:38
阅读次数:
885
Problem DescriptionGiven an positive integer A (1 2 #include 3 4 5 int main(){ 6 int A; 7 int timer; 8 9 while(1){10 t...
分类:
其他好文 时间:
2014-10-27 17:32:52
阅读次数:
143
Problem Description有n(n 2 #include 3 4 int main(){ 5 int n; 6 int m; 7 int i; 8 int number; 9 int flag;10 11 while(1){...
分类:
其他好文 时间:
2014-10-27 17:19:48
阅读次数:
147