首页 > 2014年07月27日 > 全部分享
数据结构之哈夫曼树
typedef struct{        int wiget;        int lchild,rchild,parent;        int data;     }HNode,*HTree;      void select(HTree &H,int i,int &s1,int &s2){              int tmp,min1,min2=0;   ...
分类:其他   时间:2014-07-27 11:11:52    收藏:0  评论:0  赞:0  阅读:179
Codeforces 363A Soroban
算盘的模拟 #include using namespace std; int main() { char s[20]; scanf("%s",&s); int len=strlen(s); for(int i=len-1;i>=0;i--) { if(s[i]>='5'&&s[i]<='9') { ...
分类:其他   时间:2014-07-27 11:11:42    收藏:0  评论:0  赞:0  阅读:267
数据结构之shell排序
#SIZE  10        //直接插入排序     void insert_sort(){           int i,j;           int array[SIZE+1];           array[]={0,12,23,11,55,2,34,18,20,48,22};           for(i=2;i               array[0]=...
分类:其他   时间:2014-07-27 11:11:32    收藏:0  评论:0  赞:0  阅读:259
HDU 1730 Northcott Game
Northcott Game Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2688    Accepted Submission(s): 1149 Problem Description   Tom和Jerry...
分类:其他   时间:2014-07-27 11:11:22    收藏:0  评论:0  赞:0  阅读:264
如何写一个程序升级的service
这个升级可以在程序启动时调用: 首先建立一个service的类:MyService extends Service,然后在menifest中声明: 这样来调用: Intent intent = new Intent(); intent.setClass(MainActivity.this, MyService.class); startService(intent); //...
分类:其他   时间:2014-07-27 11:11:04    收藏:0  评论:0  赞:0  阅读:291
Nginx学习——进程模型(worker进程)
进程模型 worker进程         master进程模型核心函数ngx_master_process_cycle()中调用了创建子进程函数ngx_start_worker_processes(),该函数源码如下 static void ngx_start_worker_processes(ngx_cycle_t *cycle, ngx_int_t n, ngx_int_t type)...
分类:其他   时间:2014-07-27 11:10:42    收藏:0  评论:0  赞:0  阅读:394
SPOJ - MYQ10 Mirror Number (数位DP)
Description A number is called a Mirror number if on lateral inversion, it gives the same number i.e it looks the same in a mirror. For example 101 is a mirror number while 100 is not.  Given two ...
分类:其他   时间:2014-07-27 11:10:22    收藏:0  评论:0  赞:0  阅读:373
poj 2709 Painter (贪心)
//需要n中普通原料和g ml灰色原料 //每三种不同普通原来各x ml 可以合成 x ml 灰色原料 //问最少需要集组原料 每组各原料50 ml # include # include # include using namespace std; int main() { int i,n,cot,g,a[15],g1,b[15]; while(~scanf("%d",&n),n)...
分类:其他   时间:2014-07-27 11:10:12    收藏:0  评论:0  赞:0  阅读:280
hdu 2660 Accepted Necklace(01-背包变形 || DFS)
hdu 2660 Accepted Necklace(01-背包变形 || DFS)...
分类:其他   时间:2014-07-27 11:10:02    收藏:0  评论:0  赞:0  阅读:253
c++ 银行管理系统及报告
#include #include using namespace std; class information { public :     string num ;//账号  string name;//用户名     string key;//密码     string ID;//身份证号     string tel;//电话号码     double money;/...
分类:编程语言   时间:2014-07-27 11:09:42    收藏:0  评论:0  赞:0  阅读:416
SPOJ GSS6 4487. Can you answer these queries VI (SPLAY)
题目大意: 四个操作: I X Y 在x位置插入y D x 删除x位置的数 R x y 用y替换x位置上的数字 Q x y 求出[x,y]上的最大子序列的和。 思路分析: 对于动态维护序列肯定是splay了。 现在就考虑以下几个问题。 之前我们知道线段树处理连续的子序列的和是用区间合并的。那splay上怎么做。 考虑边界,如儿子为 0 或者是冗余节点怎么办? 初始化的...
分类:其他   时间:2014-07-27 11:09:32    收藏:0  评论:0  赞:0  阅读:452
Android View系统解析(上)
Android View系统解析(上) 再说动画 View基础知识 View的滑动 View的事件分发 View的滑动冲突 Android View系统解析(下) View的绘制过程 自定义View...
分类:移动平台   时间:2014-07-27 11:09:22    收藏:0  评论:0  赞:0  阅读:339
字符串反转
java实现的字符串翻转,能想到的这几种方法 如果有其他方法,欢迎交流 //字符串反转 public class ReverseString { public String reverse1(String str){ StringBuffer sb = new StringBuffer(str); str = sb.reverse().toString(); return str...
分类:其他   时间:2014-07-27 11:09:12    收藏:0  评论:0  赞:0  阅读:304
ZOJ 3235 Prototype
PrototypeTime Limit: 1 Second Memory Limit: 32768 KBPrototype is a 3D game which allow you to control a person named Alex with much super ability t...
分类:其他   时间:2014-07-27 11:06:42    收藏:0  评论:0  赞:0  阅读:427
Divide Two Integers leetcode java
题目:Divide two integers without using multiplication, division and mod operator.题解:这道题我自己没想出来。。。乘除取模都不让用。。那只有加减了。。。我参考的http://blog.csdn.net/perfect888....
分类:编程语言   时间:2014-07-27 11:06:32    收藏:0  评论:0  赞:0  阅读:459
javascript 动态推断html元素
在javascript中为了针对不同的元素运行不同的操作,须要在javascript中对触发事件的元素进行推断,然后运行不同的操作。样例:htmljavascript获取input的name和id属性都不成功,可是value却是能够的,不知道是什么原因。參考:var obj=document.get...
分类:编程语言   时间:2014-07-27 11:06:22    收藏:0  评论:0  赞:0  阅读:204
Cutting Sticks
uva10003:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=944题意:给你一个木棍,然后让你切n刀,每次切都会有一个费用。例如,假如说一开始木棍长是1...
分类:其他   时间:2014-07-27 11:06:12    收藏:0  评论:0  赞:0  阅读:309
HDU 2845 Beans
本来是很简单的一道题,却想了好长时间由于数据量比较大,所以逐行读入,逐行处理先处理每一行的不相邻元素和的最大值,记录在数组b中最后计算不相邻行的和的最大值二者的状态转移方程都类似:dp[j] = max(dp[j - 1], dp[j - 2] + a[j]); 1 //#define LOCAL ...
分类:其他   时间:2014-07-27 11:06:02    收藏:0  评论:0  赞:0  阅读:317
01背包
Charm Bracelethttp://poj.org/problem?id=362401背包模板题带空间复杂度优化的。 1 #include 2 #include 3 #include 4 #define mt(a,b) memset(a,b,sizeof(a)) 5 using namespa...
分类:其他   时间:2014-07-27 11:05:52    收藏:0  评论:0  赞:0  阅读:310
无需server-U IIS7.5 在已有的多个WEB网站上配置FTP发布
1 新建一个用于ftp登陆的计算机用户。 操作:开始→管理工具→计算机管理→本地用户和组→用户,新建一个计算机用户,设置好用户名和密码,例如:nenkea nkscl 2 在web站点文件夹下,把新建用户的所有权限给到。操作: 在iis中,选中您要添加的ftp站点,右击选择“编辑权限”,在“...
分类:Web开发   时间:2014-07-27 11:05:42    收藏:0  评论:0  赞:0  阅读:743
1356条   上一页 1 ... 49 50 51 52 53 ... 68 下一页
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!