有10个数按由小到大顺序存放在一个数组中,输入一个数,要求用折半查找法找出该数是数组中第几个元素的值。如果该数不在数组中,则打印出“无此数”。 输入:-12 -8 12 24 45 46 56 58 68 78 输入要查找的数据:58 输出:58的下标为7 输入要查找的数据:21 输出:”无此数” ...
分类:
编程语言 时间:
2017-01-08 08:07:08
阅读次数:
159
Codeforces Round #390 (Div. 2) 22:35~0:35 1.6.2017 A.Lesha and array splitting 题意:自己看 题解: 构造什么的最弱了 想了想,貌似除了0每个数单独一组就可以,只要有一个非0数则一定可以有解 0的话不停往前找到第一个非0然 ...
分类:
其他好文 时间:
2017-01-08 03:31:32
阅读次数:
192
POJ 2104 K-th Number 时空隧道 题意: 给出一个序列,每次查询区间第k小 分析: 整体二分入门题? 代码: 1 #include<algorithm> 2 #include<iostream> 3 #include<cstring> 4 #include<cstdio> 5 // ...
分类:
其他好文 时间:
2017-01-07 19:38:34
阅读次数:
318
getaddrinfo方法用于通过url解析dns socket.getaddrinfo(host, port[, family[, socktype[, proto[, flags]]]]) 返回值:[(family, socktype, proto, canonname, sockaddr)]有 ...
分类:
其他好文 时间:
2017-01-07 18:16:57
阅读次数:
296
1,针对mysql操作 2.python链接数据库并执行备份 3.redis操作。。。。 ...
分类:
数据库 时间:
2017-01-07 12:15:11
阅读次数:
455
ConvertHelper public class ConvertHelper { /// <summary> /// 转换类型 /// </summary> /// <typeparam name="T">要转换的类型,可以为Nullable的泛型</typeparam> /// <param ...
分类:
Web程序 时间:
2017-01-06 14:06:05
阅读次数:
225
Dior 的美妝創新總監new balance 878聊他的職業,和化妝品購買者的改觀。Raf Simons 還在 Dior 供職創新總監那會,找到了他的朋友 Peter Philinew balance 878ps 去做商家的美妝創新總監。上 個世紀 90 年代,Peter Philips 在菲律 ...
分类:
其他好文 时间:
2017-01-05 23:52:52
阅读次数:
294
本文转载自:http://blog.chinaunix.net/uid-25014876-id-111745.html linux设备驱动归纳总结(九):1.platform总线的设备和驱动 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ...
分类:
系统相关 时间:
2017-01-05 13:04:19
阅读次数:
191
#include int map[4][4]={ 0,1,0,0, 0,0,0,0, 0,0,0,0, 0,1,0,0}; int flag=0; int minci=99999; int qi[16]; int zhenqi[16]; void fan(int x,int y) { map[x][... ...
分类:
其他好文 时间:
2017-01-05 09:45:38
阅读次数:
154
主要是从汉诺塔及八皇后问题体会递归算法。 汉诺塔: #include <stdio.h> void move(int n, char x,char y, char z){ if(1==n) { printf("%c-->%c\n",x,z); } else { move(n-1,x,z,y); // ...
分类:
其他好文 时间:
2017-01-03 20:38:44
阅读次数:
177