码迷,mamicode.com
首页 > 其他好文
hdu 1062 Text Reverse 字符串反转
Text Reverse Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18240    Accepted Submission(s): 6900 Problem Description Ignatius...
分类:其他好文   时间:2015-01-26 22:58:27    阅读次数:256
Tomcat 默认项目配置,导致tomcat启动两次 解决
tomcat 配置默认项目路径 ,导致项目启动两次的解决方法...
分类:其他好文   时间:2015-01-26 22:56:27    阅读次数:200
BZOJ 3251 树上三角形 暴力
题目大意:给定一棵树,每个点上有点权,多次修改点权,以及查询两点间路径上所有点权之间能否找出三个值构成三角形的三边长 被逗了- - 首先考虑如果一些数不能构成三角形的三边长,那么这些数最多有多少个? 显然当这些数构成斐波那契数列的时候数值的个数最多- - 那么2^31以内共有多少个斐波那契数?46! 也就是说当两点间路径上的点>=47时答案一定是YES! 那么小于47时只要暴力就行- ...
分类:其他好文   时间:2015-01-26 22:57:17    阅读次数:202
HDU 1142
A Walk Through the Forest Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5999 Accepted Submission(s): 2215 Problem Description Jimmy expe...
分类:其他好文   时间:2015-01-26 22:57:34    阅读次数:334
杭电acm:大数阶乘(附源码)
Problem Description Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N! Input One N in one line, process to the end of file. Output For each N, output N! in one line. ...
分类:其他好文   时间:2015-01-26 22:54:23    阅读次数:236
杭电acm:最小公倍数(附源码)
Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and...
分类:其他好文   时间:2015-01-26 22:56:41    阅读次数:202
uva 11384 Help is needed for Dexter(模拟)
uva 11384 Help is needed for Dexter Dexter is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he planned for her is quite easy to play but not easy to win at least not ...
分类:其他好文   时间:2015-01-26 22:56:09    阅读次数:213
HDU 1237
卡了一天。。太难了。...
分类:其他好文   时间:2015-01-26 22:53:41    阅读次数:227
螺旋队列顺时针方向 和逆时针方向的实现
这个博主找规律的部分写得很好,原样放在下面。最后给出了顺时针和逆时针方向的螺旋队列的实现,可以看出它们的差别如此之小。 和螺旋队列类似,也是找规律的zigzag数组见这个帖子。 螺旋队列的样子如下图: 两大规律: 1、螺旋规律 2、奇数(圈数,或X轴正坐标)平方规律(紫线)   问题描述:   设1的坐标是(0,0),x方向向右为正,y方向向下为正,例如,7的坐标为(...
分类:其他好文   时间:2015-01-26 22:55:48    阅读次数:247
1001. A+B Format
Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Each input file cont...
分类:其他好文   时间:2015-01-26 22:54:20    阅读次数:196
模拟退火求解TSP问题<2变换法产生路径>
模拟退火解TSP/* * @file SA.cpp * @brief SA解TSP * @author/Univ. taoxiaoxiao/XMU * @date 11-2-2014 */ #include #include #include using namespace std; #define max 51 //最大的输入规格 int a[m...
分类:其他好文   时间:2015-01-26 22:53:15    阅读次数:389
重构笔记——将类内联化
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/43159817         在上一篇文章中介绍了“提炼类”。本文将介绍“将类内联化”这种重构手法。         下面让我们来学习这种重构手法吧。 开门见山         发现:某个类并没有做太多的事情。         解决:将这个类的所有特性搬移到另一个类中,然后移除原类。 动机...
分类:其他好文   时间:2015-01-26 22:51:47    阅读次数:214
Uva 10617 Again Palindrome(区间dp)
Again Palindromes Input: Standard Input Output: Standard Output Time Limit: 2 Seconds   A palindorme is a sequence of one or more characters that reads the same from the left as it does from th...
分类:其他好文   时间:2015-01-26 22:50:54    阅读次数:205
scheme 符号求导程序
SICP 习题: #lang scheme ( define ( variable? x )    ( symbol? x ) ) ( define ( same-variable? x y )    ( and ( variable? x )          ( variable? y )          ( eq? x y ) ) ) ( define ...
分类:其他好文   时间:2015-01-26 22:49:12    阅读次数:156
请注意,Volley已默认使用磁盘缓存
之前学习volley框架,用ImageLoader可以设置内存缓存,用一个LruCache,就可以避免OOM且图片读取速度快,爽极了。 后来想,如果只是内存缓存的话,那退出程序或者内存不够大了,缓存的图片不就被清理掉了,这样每次启动程序就又得去网上下载图片,流量好贵的。 于是找到了磁盘缓存框架DiskLruCache,这是一个挺著名的开源框架,网易云阅读等APP之前都用它来缓存图片,关...
分类:其他好文   时间:2015-01-26 22:49:11    阅读次数:263
initramfs对应的init脚本文件,解压后可见
#!/bin/sh [ -d /dev ] || mkdir -m 0755 /dev [ -d /root ] || mkdir -m 0700 /root [ -d /sys ] || mkdir /sys [ -d /proc ] || mkdir /proc [ -d /tmp ] || mkdir /tmp mkdir -p /var/lock mount -t sys...
分类:其他好文   时间:2015-01-26 22:49:01    阅读次数:450
POJ 2774 Long Long Message && URAL 1517. Freedom of Choice(求最长重复子序列)
两个题目意思差不多,都是让求最长公共子串,只不过poj那个让输出长度,而URAL那个让输出一个任意的最长的子串。 解体思路: Long Long Message Time Limit: 4000MS   Memory Limit: 131072K Total Submissions: 22313   Accep...
分类:其他好文   时间:2015-01-26 22:49:45    阅读次数:369
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!