#include#include#include#includeusing namespace std;int main(){ int t,n,m; int i,j,k; scanf("%d",&t); while(t--) { scanf("%d%d",...
分类:
其他好文 时间:
2015-08-19 00:14:15
阅读次数:
123
Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements t...
分类:
其他好文 时间:
2015-08-19 00:12:36
阅读次数:
201
分类:
其他好文 时间:
2015-08-19 00:13:32
阅读次数:
193
在CLR中为了将一个值类型转换成一个引用类型,要使用一个名为装箱的机制。 下面总结了对值类型的一个实例进行装箱操作时内部发生的事: 1)在托管堆中分配好内存。分配的内存量是值类型的各个字段需要的内存量加上托管堆上的所有对象都有的两个额外成员(类型对象指针和同步块索引)需要的内存量。 2)值类型...
分类:
其他好文 时间:
2015-08-19 00:11:56
阅读次数:
234
一直对zookeeper的应用和原理比较迷糊,今天看一篇文章,讲得很通透,分享如下:场景一有这样一个场景:系统中有大约100w的用户,每个用户平 均有3个邮箱账号,每隔5分钟,每个邮箱账需要收取100封邮件,最多3亿份邮件需要下载到服务器中(不含附件和正文)。用20台机器划分计算的压力,从 多个不同...
分类:
其他好文 时间:
2015-08-19 00:13:19
阅读次数:
253
9号早上六点整就起床了,这是因为要去成都,而且买的还是早上七点的票。对于坐车,我向来就是一个弱者,我是一个严重晕车者。起来收拾了一下行李不一会儿就到点了,于是托着那破旧的烂箱子,一步一步在黑暗的校舍中踱步着向校门走去。天很冷,连托箱子的手都快失去知觉了,更不用说是脸了。渐渐接近校门时耳朵就传来了话声...
分类:
其他好文 时间:
2015-08-19 00:11:19
阅读次数:
141
区间dp,切割dp[i][j]的花费和切法无关(无后效性)dp[i][j]表示区间i,j的花费,于是只要枚举切割方法就行了,区间就划分成更小的区间了。O(n^3)看了看四边形不等式,证明太长了。#include //变量不要取成ignore left之类using namespace std;con...
分类:
其他好文 时间:
2015-08-19 00:13:11
阅读次数:
336
public String getVersion(Context context){ PackageManager pm = null; PackageInfo packageInfo = null; ...
分类:
其他好文 时间:
2015-08-19 00:10:40
阅读次数:
160
dfs序真厉害(cena没有o2,vector会炸) 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #define intree(u,v) (id[u]=L[v])1...
分类:
其他好文 时间:
2015-08-19 00:12:49
阅读次数:
363
public static boolean isServiceRun(Context context,String serviceName){ ActivityManager am = (ActivityManager) context.getSystemService(Con...
分类:
其他好文 时间:
2015-08-19 00:12:33
阅读次数:
176
UVa 10618Fixing the Great Wall题目:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=36139思路:数轴上有n个点需要修复,每个点有信息c,x,d 表示位于x且在t时修缮的费用是c+d*t,找一个修...
分类:
其他好文 时间:
2015-08-19 00:12:24
阅读次数:
221
不让对方执行w的时候看到我ssh -T root@8.8.8.8 bin/sh -i还有一个技巧:远程登录时防止被记录到knowhosts文件(默认为~/.ssh/knowhosts)ssh -o UserKnownHostsFile=/dev/null -T user@host /bin/bash...
分类:
其他好文 时间:
2015-08-19 00:09:58
阅读次数:
370
leetcode -Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to...
分类:
其他好文 时间:
2015-08-19 00:10:57
阅读次数:
207
最近在老家出差,老家电网改革,使用了智能电表,把老式电表全部换了还给了一个客户号,终于也可以在支付宝什么的交电费了,但我们那里支付宝还不能查询剩余多少钱,这让人很恼火,于是就来国家电网http://www.95598.cn/person/index.shtml 查询了一下,发现需要客户号、查询密.....
分类:
其他好文 时间:
2015-08-19 00:09:39
阅读次数:
13101
public class JCFX{ static{//静态语句块最先执行 System.out.println( "ppp" ); } public static void main(String[] args){ A aaa = new A();//...
分类:
其他好文 时间:
2015-08-19 00:08:44
阅读次数:
231
Coins in a Line IIIThere arencoins in a line. Two players take turns to take a coin from one of the ends of the line until there are no more coins lef...
分类:
其他好文 时间:
2015-08-19 00:09:26
阅读次数:
247
1.移动设备优先移动设备优先是 Bootstrap 3 的最显著的变化。在之前的 Bootstrap 版本中(直到 2.x),您需要手动引用另一个 CSS,才能让整个项目友好的支持移动设备。现在不一样了,Bootstrap 3 默认的 CSS 本身就对移动设备友好支持。Bootstrap 3 的设计...
分类:
其他好文 时间:
2015-08-19 00:08:16
阅读次数:
5078