代码:
#include
#include
#include
#include
using namespace std;
const int maxn=10003;
const int inf=0x7fffffff;
int num[maxn];
int n;
int main()
{
while(scanf("%d",&n)!=EOF&&n)...
分类:
其他好文 时间:
2014-05-04 12:39:16
阅读次数:
331
1 while 等循环语句1 break 和 continue的去别2
将短的循环写在外面,长的写在里面;3 循环嵌套尽量短2 voidvoid *p,为空指针类型,可以指向任何的类型若函数不接受参数,应写明 void,3
return1234567891011121314#include int ...
分类:
其他好文 时间:
2014-05-03 23:17:33
阅读次数:
368
题意:给定背包体积与物品的体积与价值 求正好放完的最小价值#includeusing
namespace std;int min(int a,int b){ if(a>t; while(t--) {
cin>>m1>>m2; m=m2-m1; ...
分类:
其他好文 时间:
2014-05-03 22:37:20
阅读次数:
437
题意:求最大上升子序列和#includeusing namespace std;int
main(){ int n,a[1001],b[1001],max; while(cin>>n&&n!=0) { for(int
i=1;i>a[i]; b[1]=a...
分类:
其他好文 时间:
2014-05-03 22:29:38
阅读次数:
282
screen 默认使用 bash shell,一般情况下screen只用于android
build,tmux则是我的日常使用多终端管理工具。# Default Shellshell "/bin/bash"# show status
barhardstatus alwayslastline "%{b...
分类:
系统相关 时间:
2014-05-03 22:14:57
阅读次数:
454
tmux中默认的shell是zsh,zsh在日常中使用可以协助我们高效地使用shell命令。#
设置Shellset-option -g default-shell /bin/zsh# 设置复制模式,空格开始选,Enter结束复制setw -g
mode-keys vi #开启status-bar ...
分类:
系统相关 时间:
2014-05-03 22:06:18
阅读次数:
1323
#!/bin/bash
clear
echo ""
echo "Enter Your First Name:"
read FirstName
echo "Enter Your Last Name:"
read LastName
echo "$FirstName $LastName">trans.dat...
分类:
其他好文 时间:
2014-05-03 22:02:31
阅读次数:
299
一直都知道自己很死板,刚刚再一次验证了。。下载下来android开发必备的工具之后,就按部就班的一步步的来了,没想过这些工具有没有其他用处,更有甚者,在刚开始接触android的时候,竟然不知道自己写的app可以在真机上运行。。不得不承认,我不是一个好的学习者。学习,应该处处充满好奇心!
言归正转,进入android shell很简单,只需要你进入adb的存放目录,执行./adb shell就可...
分类:
移动开发 时间:
2014-05-03 21:29:31
阅读次数:
394
题目:经典dp题目,求出最大相邻子序列的和。
方法:给出两种方法,一种dp,一种直接暴力(数据量小的时候可以考虑)。
代码1:
#include
#include
using namespace std;
int main()
{
int n;
int t=1;
cin>>n;
int s[100010];
while(t<=n)
{
...
分类:
其他好文 时间:
2014-05-03 17:02:34
阅读次数:
324
#!/bin/bash#thisscriptisonlyforCentOS6#checktheOSplatform=`uname-i`if[$platform!="x86_64"];thenecho"thisscriptisonlyfor64bitOperatingSystem!"exit1fiecho"theplatformisok"version=`lsb_release-r|awk‘{printsubstr($2,1,1)}‘`if[$version!=6];thenecho"thisscriptiso..
分类:
系统相关 时间:
2014-05-03 14:51:00
阅读次数:
415