#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:12:42
收藏:
0 评论:
0 赞:
0 阅读:
258
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:12
收藏:
0 评论:
0 赞:
0 阅读:
291
分类:
其他 时间:
2015-08-19 00:11:53
收藏:
0 评论:
0 赞:
0 阅读:
347
在CLR中为了将一个值类型转换成一个引用类型,要使用一个名为装箱的机制。 下面总结了对值类型的一个实例进行装箱操作时内部发生的事: 1)在托管堆中分配好内存。分配的内存量是值类型的各个字段需要的内存量加上托管堆上的所有对象都有的两个额外成员(类型对象指针和同步块索引)需要的内存量。 2)值类型...
分类:
其他 时间:
2015-08-19 00:11:45
收藏:
0 评论:
0 赞:
0 阅读:
268
一直对zookeeper的应用和原理比较迷糊,今天看一篇文章,讲得很通透,分享如下:场景一有这样一个场景:系统中有大约100w的用户,每个用户平 均有3个邮箱账号,每隔5分钟,每个邮箱账需要收取100封邮件,最多3亿份邮件需要下载到服务器中(不含附件和正文)。用20台机器划分计算的压力,从 多个不同...
分类:
其他 时间:
2015-08-19 00:11:12
收藏:
0 评论:
0 赞:
0 阅读:
486
9号早上六点整就起床了,这是因为要去成都,而且买的还是早上七点的票。对于坐车,我向来就是一个弱者,我是一个严重晕车者。起来收拾了一下行李不一会儿就到点了,于是托着那破旧的烂箱子,一步一步在黑暗的校舍中踱步着向校门走去。天很冷,连托箱子的手都快失去知觉了,更不用说是脸了。渐渐接近校门时耳朵就传来了话声...
分类:
其他 时间:
2015-08-19 00:11:02
收藏:
0 评论:
0 赞:
0 阅读:
433
区间dp,切割dp[i][j]的花费和切法无关(无后效性)dp[i][j]表示区间i,j的花费,于是只要枚举切割方法就行了,区间就划分成更小的区间了。O(n^3)看了看四边形不等式,证明太长了。#include //变量不要取成ignore left之类using namespace std;con...
分类:
其他 时间:
2015-08-19 00:10:52
收藏:
0 评论:
0 赞:
0 阅读:
202
public String getVersion(Context context){ PackageManager pm = null; PackageInfo packageInfo = null; ...
分类:
其他 时间:
2015-08-19 00:10:32
收藏:
0 评论:
0 赞:
0 阅读:
165
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:10:22
收藏:
0 评论:
0 赞:
0 阅读:
289
public static boolean isServiceRun(Context context,String serviceName){ ActivityManager am = (ActivityManager) context.getSystemService(Con...
分类:
其他 时间:
2015-08-19 00:09:42
收藏:
0 评论:
0 赞:
0 阅读:
266
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:09:32
收藏:
0 评论:
0 赞:
0 阅读:
213
不让对方执行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:12
收藏:
0 评论:
0 赞:
0 阅读:
317
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:08:52
收藏:
0 评论:
0 赞:
0 阅读:
169
最近在老家出差,老家电网改革,使用了智能电表,把老式电表全部换了还给了一个客户号,终于也可以在支付宝什么的交电费了,但我们那里支付宝还不能查询剩余多少钱,这让人很恼火,于是就来国家电网http://www.95598.cn/person/index.shtml 查询了一下,发现需要客户号、查询密.....
分类:
其他 时间:
2015-08-19 00:07:52
收藏:
0 评论:
0 赞:
0 阅读:
561
public class JCFX{ static{//静态语句块最先执行 System.out.println( "ppp" ); } public static void main(String[] args){ A aaa = new A();//...
分类:
其他 时间:
2015-08-19 00:07:12
收藏:
0 评论:
0 赞:
0 阅读:
228
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:06:52
收藏:
0 评论:
0 赞:
0 阅读:
233
1.移动设备优先移动设备优先是 Bootstrap 3 的最显著的变化。在之前的 Bootstrap 版本中(直到 2.x),您需要手动引用另一个 CSS,才能让整个项目友好的支持移动设备。现在不一样了,Bootstrap 3 默认的 CSS 本身就对移动设备友好支持。Bootstrap 3 的设计...
分类:
其他 时间:
2015-08-19 00:06:42
收藏:
0 评论:
0 赞:
0 阅读:
170
题目:给一个定义:对一个整数,若其中存在相邻两位上的数字相同,则称其为“重复的数”;现给定一个正整数n,求不小于n的最小的非“重复的数”。思路:假设输入的数为n,则令m=n,分别取m的最低两位数字a,b,判断是否a==b,如果是说明是重复的数,那么递归调用n=m+1;考虑特殊情况,ab=99,产生进...
分类:
其他 时间:
2015-08-19 00:06:02
收藏:
0 评论:
0 赞:
0 阅读:
182
Context,中文直译为“上下文”,SDK中对其说明如下:Interface to global information about an application environment. This is an abstract class whose implementation is pro....
分类:
其他 时间:
2015-08-19 00:05:42
收藏:
0 评论:
0 赞:
0 阅读:
295
fdquery updatethis->FDQuery1->CachedUpdates;this->FDQuery1->UpdateOptions->KeyFields;this->FDQuery1->UpdateOptions->UpdateTableName;this->FDQuery1->Re...
分类:
其他 时间:
2015-08-19 00:05:12
收藏:
0 评论:
0 赞:
0 阅读:
457