码迷,mamicode.com
首页 > 其他好文
hdu 5441 Travel(并查集)
Problem DescriptionJack likes to travel around the world, but he doesn’t like to wait. Now, he is traveling in the Undirected Kingdom. There are n cit...
分类:其他好文   时间:2015-09-13 21:29:20    阅读次数:129
文字环绕
#import "ViewController.h"//coretext@interface ViewController (){ //指定文本的区域,默认为矩形 NSTextContainer *_textContainer; //用于存储文本和文本相关的属性 NSText...
分类:其他好文   时间:2015-09-13 21:28:34    阅读次数:163
POJ 2305大数求余
一开始是的想法是用减法代替除法,一直减到被减数小于减数,所得的被减数就是余数。为了方便编程,还在减法中对齐了被减数和减数的位数。但过程还是比较麻烦,会超时。 1 #include "stdafx.h" 2 #include 3 #include 4 using namespace std; 5 in...
分类:其他好文   时间:2015-09-13 21:30:20    阅读次数:180
节点的创建,追加,删除,替换
# 节点的创建 #获取父对象var div = document.getElementById("div");var p = document.getElementById("p");增加节点的标签名var a = document.createElement("a");增加节点的属性a.href=...
分类:其他好文   时间:2015-09-13 21:29:30    阅读次数:156
hdu 5441 Travel 长春网赛
想到最小生成树的sort+并查集算法,于是可以顺便用并查集维护点所在的连通分量的点的数目(不知道学名是不是这么说),记为poi[v];然后当边权限制为f[i].w时,其答案为ww[i]=ww[i-1]-(poi[u]-1)*poi[u]-(poi[v]-1)*poi[v]+(poi[u]+poi[v...
分类:其他好文   时间:2015-09-13 21:29:37    阅读次数:167
《那一天,那一月,那一年,那一世》-------仓央嘉措
那一天, 我闭目在经殿的香雾中, 蓦然听见你颂经中的真言; 那一月, 我摇动所有的经筒, 不为超度, 只为触摸你的指尖; 那一年, 磕长头匍匐在山路, 不为觐见, 只为贴着你的温暖; 那一世, 转山转水转佛塔, 不为修来世, 只为途...
分类:其他好文   时间:2015-09-13 21:27:41    阅读次数:150
[转]Faking success in SSIS
Faking success in SSISAn article by DougbertA SQL Server Integration Services package has a set of properties with similar names that let you:force th...
分类:其他好文   时间:2015-09-13 21:29:16    阅读次数:236
高德地图详细使用方法
1.简单定位- (void)viewDidLoad { [super viewDidLoad]; _mapView.showsUserLocation = YES; [_mapView setUserTrackingMode:MAUserTrackingModeFollow...
分类:其他好文   时间:2015-09-13 21:27:59    阅读次数:1141
用提交按钮提交form问题验证没通过依然提交表单
交易订单号:* 备注: 提 交 取 消...
分类:其他好文   时间:2015-09-13 21:28:27    阅读次数:131
经典笔试题
若有以下定义和赋值语句,则与&s[i][j]等价的是(C)ints[2][3] = {0}, (*p)[3], i, j;p = s;i = j =1;A. *(*(p+i)+j)B. *(p[i]+j)C. *(p+i)+jD. (*(p+i))[j]
分类:其他好文   时间:2015-09-13 21:27:33    阅读次数:116
锚定梦想,一切变简单(不是真的有勇气,而是不能帮助实现梦想的环境要坚决放弃)
锚定梦想,一切变简单(2013年6月26日,在北大法学院回答关于选择的问题)有一个故事,说的是一头驴,背着两捆草,饿了,到底放下那一捆来吃呢?一直犹豫不决,结果饿死了。这个故事有些夸张,但人生很多路口,大家都会在路口上徘徊。做选择是很难很痛苦的,这边有诱惑,那边也有诱惑。到底选择哪个?我的同学都出国...
分类:其他好文   时间:2015-09-13 21:27:44    阅读次数:103
Leetcode - Find the Celebrity
Suppose you are at a party withnpeople (labeled from0ton - 1) and among them, there may exist one celebrity. The definition of a celebrity is that all...
分类:其他好文   时间:2015-09-13 21:25:23    阅读次数:148
poj1284 Primitive Roots
考虑互质的两个数a 2 #include 3 using namespace std; 4 int n; 5 int prime[100], k; 6 7 void solve(){ 8 int m = n - 1; 9 k = 0;10 if(m % 2 == 0){...
分类:其他好文   时间:2015-09-13 21:27:09    阅读次数:133
盗墓笔记读后感
很久没动笔了,估计生疏了许多。断断续续,花了将近两周的时间看完了盗墓笔记,一开始感觉的是惊险、刺激,超级有画面感的描述方式,让我久久沉浸于其中。再往后,越看越有一种淡淡的伤萦绕在情节中。主人公吴邪是那种烂好人的性格,天性纯良,然而一次次的盗墓,一次次谜底的揭穿,个中情节的曲折和相关人物的决绝狠戾让他...
分类:其他好文   时间:2015-09-13 21:24:40    阅读次数:118
hdu 5444 Elven Postman长春网赛
5444 2333建二插排序树,dfs一遍,之后o(1)应对查询#include#include#include#includeusing namespace std;const int maxn=1008;struct fuck{ int left,right;}poi[maxn];int tol...
分类:其他好文   时间:2015-09-13 21:25:41    阅读次数:148
[LeetCode]Search a 2D Matrix II
Search a 2D Matrix IIWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each ...
分类:其他好文   时间:2015-09-13 21:26:09    阅读次数:132
openoffice在连接时有错误,无法连接上
openoffice在连接时有错误,无法连接上报如下错误:java.net.ConnectException: connection failed: socket,host=localhost,port=8100,tcpNoDelay=1: java.net.ConnectException: Co...
分类:其他好文   时间:2015-09-13 21:25:58    阅读次数:2868
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!