码迷,mamicode.com
首页 >  
搜索关键字:do while    ( 38720个结果
uva 11988 这题可以看出c++中string效率的底下
用c语言实现 #include #include #include using namespace std; typedef struct node { char x; struct node *next; }chan; chan *root = new chan; char a[100010]; int main() { while(scanf("%...
分类:编程语言   时间:2014-04-29 13:47:20    阅读次数:358
UVA 617 - Nonstop Travel(数论+暴力枚举)
题目链接:617 - Nonstop Travel 题意:给定一些红绿灯,现在速度能在30-60km/h之内,求多少个速度满足一路不遇到红灯。 思路:暴力每一个速度,去判断可不可以,最后注意下输出格式即可 代码: #include #include #include const double esp = 1e-6; int n, vis[105]; struct D { do...
分类:其他好文   时间:2014-04-29 13:45:20    阅读次数:333
Leetcode:Reorder List 单链表重排序
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, reorder it to ...
分类:其他好文   时间:2014-04-29 13:42:21    阅读次数:427
Perl生成excel文件
#生成excel #ljl use Spreadsheet::WriteExcel; my %us; while(($key, $value) = each %us){ print "$key|$value\n"; } # 创建一个新的EXCEL文件 my $workbook = Spreadsheet::WriteExcel->new('poi_count_top15....
分类:其他好文   时间:2014-04-29 13:33:21    阅读次数:327
[TroubleShooting]Neither the partner nor the witness server instance for database is availble
Problem: You are trying to setup a mirroring on a Database called xxxDB(SQL server 2012). You are getting this error while trying to setup mirroring. “Neither the partner nor the witness server ins...
分类:数据库   时间:2014-04-29 13:33:20    阅读次数:444
链表《2》使用函数操作链表
使用函数操作链表 1:计算链表中结点的个数:定义一个Length_list()函数用于计算链表中结点的个数 函数代码: //计算链表中结点的个数 void Length_list(PNODE pHead) { PNODE p = pHead->pNext; int len = 0; while(NULL != p) { len++; p = p->pNext; ...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:302
ZOJ 2588 Burning Bridges 求无向图桥 边双连通裸题
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1588 #include #include #include #include #include using namespace std; #define N 10050 #define M 200005 int n,m;//n个点 m条边 struct Edge{...
分类:其他好文   时间:2014-04-29 13:25:21    阅读次数:383
树莓派玩家需要的X条核心品格
本文只是作者本人在混迹于树莓派相关的论坛贴吧良久后的一些感想。纯属个人观点,限于本人能力有限,难免有所偏颇,还望斧正。 在能想到的所有品格中我认为最重要的就是这个: LIY / TIY / DIY Learn it yourself / Try it yourself / Do it yourself, 自己学、自己试、自己做。麻雀虽小五脏俱全,树莓派是一个复杂的系统,涉及到...
分类:其他好文   时间:2014-04-29 13:23:20    阅读次数:300
leetcode day6 -- String to Integer (atoi) && Best Time to Buy and Sell Stock I II III
1、 ?? String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yours...
分类:其他好文   时间:2014-04-29 13:22:22    阅读次数:341
wustoj 1318 区间的连通性 (最短路)
floyd求最短路。 注意图是有向图。。。 #include #include #include using namespace std; struct node { int x,y,id; }edge[205]; int dis[205][205]; int main() { int c,T,n,a,b,op; while(scanf("%d",&T...
分类:其他好文   时间:2014-04-29 13:21:23    阅读次数:313
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!