首页 > 其他
USACO--2.4The Tamworth Two
这题目一看就是一个模拟题,但是问题在于我们什么时候结束这次的模拟判断他们不可能相遇。开始的时候我想了几种可能循环的情况作为结束的判断条件,但都是超时;然后我想可不可设置一个时间上限来作为结束模拟的条件,然后我就设了一个上限100000,没想到AC了,后面我给改成1000还是可以AC。。。。。。。 后面看了一下官方的解答,我的思路是对的,但是上限设小了。考虑将一个格子的坐标加上站在这个格子中时面向的...
分类:其他   时间:2015-03-26 17:43:31    收藏:0  评论:0  赞:0  阅读:259
C编译器剖析_4.4 语义检查_外部声明_内部连接和外部连接
本节介绍C语言的内部连接Interal Linkage和外部连接External Linkage。...
分类:其他   时间:2015-03-26 17:42:51    收藏:0  评论:0  赞:0  阅读:230
荟萃在线音乐播放器,一起制作,第一部分用户登录模块(持续更新)
荟萃在线音乐播放器,一起制作,第一部分用户登录模块(持续更新)...
分类:其他   时间:2015-03-26 17:41:31    收藏:0  评论:0  赞:0  阅读:322
蓝桥杯 ALGO-53 最小乘积(基本型)(水题)
【思路】:一个升序,一个降序,相乘。 【AC代码】: #include #include #include #include #include using namespace std; #define MAX 8+1 int cmp_a(const void *a, const void *b) { return *(int*)a - *(int*)b; } int cmp_...
分类:其他   时间:2015-03-26 17:41:27    收藏:0  评论:0  赞:0  阅读:249
[LeetCode 143] Reorder List
题目链接: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 exa...
分类:其他   时间:2015-03-26 17:40:41    收藏:0  评论:0  赞:0  阅读:164
HDU 1506 Largest Rectangle in a Histogram (线性dp)
HDU 1506 Largest Rectangle in a Histogram (线性dp)...
分类:其他   时间:2015-03-26 17:40:31    收藏:0  评论:0  赞:0  阅读:176
Thymeleaf模版引擎ClassLoaderTemplateResolver用法
今天用到Thymeleaf模版引擎,因为不是传统的web工程,所以网上资料很少。 网上的例子大多是servletContextTemplateResolver,这里用的是classLoaderTemplateResolver。 好容易找到一个例子...
分类:其他   时间:2015-03-26 17:40:21    收藏:0  评论:0  赞:0  阅读:347
Epoll模型详解
Linux 2.6内核中提高网络I/O性能的新方法-epoll I/O多路复用技术在比较多的TCP网络服务器中有使用,即比较多的用到select函数。 1、为什么select落后     首先,在Linux内核中,select所用到的FD_SET是有限的,即内核中有个参数__FD_SETSIZE定义了每个FD_SET的句柄个数,在 我用的2.6.15-25-386内核中,该值是1024,搜...
分类:其他   时间:2015-03-26 17:40:11    收藏:0  评论:0  赞:0  阅读:133
xcode 删除项目中未使用的图片。
没有使用 SVN,Git 等版本控制工具的项目 最好别使用。  以免你要恢复图片,就恢复不了了。      第一次使用 请做好备份。  这个项目会直接删除图片。和修改project文件。  实现方式根据 project.pbxproj  获取全部图片的路径和     提取出(去掉@ 符号的文件名)  遍历  project.pbxproj 中的 .m 和 .xib 文件    ...
分类:其他   时间:2015-03-26 17:40:01    收藏:0  评论:0  赞:0  阅读:1320
九宫重排—题解
历届试题 九宫重排   时间限制:1.0s   内存限制:256.0MB        问题描述   如下面第一个图的九宫格中,放着 1~8 的数字卡片,还有一个格子空着。与空格子相邻的格子中的卡片可以移动到空格中。经过若干次移动,可以形成第二个图所示的局面。   我们把第一个图的局面记为:12345678.   把第二个图的局面记为:123.46758 ...
分类:其他   时间:2015-03-26 17:39:51    收藏:0  评论:0  赞:0  阅读:242
LeetCode | Unique Path
题目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to r...
分类:其他   时间:2015-03-26 17:39:41    收藏:0  评论:0  赞:0  阅读:239
Cloud Foundry service broker开发部署实例解析(上)
Cloud Foundry(CF)通过buildpack扩展运行不同语言应用的能力,通过service broker(SB)扩展支持应用所需的各种关系数据库、中间件、缓存、云存储、内存数据库等各种服务的能力。这篇博文将从头至尾介绍通用的SB开发和部署。...
分类:其他   时间:2015-03-26 17:39:31    收藏:0  评论:0  赞:0  阅读:255
HDU3652
#include using namespace std; int digit[12]; int dp[12][13][3]; int DFS(int pos, int pre, int have, int flag) { if(pos == -1) return have == 2 && pre == 0; if(!flag && dp[pos][pre][have] ...
分类:其他   时间:2015-03-26 17:39:11    收藏:0  评论:0  赞:0  阅读:152
蓝桥杯 ALGO-51 Torry的困惑(基本型)(质数)
【思路】:质数打表,乘积乘的同时取余。 【AC代码】: #include #include #include #include #include using namespace std; #define MAX 100000+5 int prime_list[MAX]; int isPrime(int n) { int i = 0; for (i = 2; i <= sqrt...
分类:其他   时间:2015-03-26 17:39:01    收藏:0  评论:0  赞:0  阅读:236
POJ 题目1837 Balance(分组背包)
Balance Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 11356   Accepted: 7073 Description Gigel has a strange "balance" and he wants to poise it. Actually, ...
分类:其他   时间:2015-03-26 17:38:51    收藏:0  评论:0  赞:0  阅读:169
L - Oil Deposits HDU 1241 基础BFS
L - Oil Deposits Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1241 Description The GeoSurvComp geologic survey company is responsible for detec...
分类:其他   时间:2015-03-26 17:38:41    收藏:0  评论:0  赞:0  阅读:172
解释器模式
解释器模式的类图如下:   定义了上下文对象,在对象中有两个数,我们要对这两个数进行对应的运算。我们在接口中定义了解释器,其中有一个解释的方法。在加法中我们实际的解释加的具体操作是什么。                [java] view plaincopy public interface Expression {       public int interpre...
分类:其他   时间:2015-03-26 17:38:11    收藏:0  评论:0  赞:0  阅读:252
简繁体字对照字库
常用简繁体字对照表,搜集了1417个常用繁体字及其对应简体字,并进行了合适的排版,便于编写简繁体字转换程序。...
分类:其他   时间:2015-03-26 17:37:51    收藏:0  评论:0  赞:0  阅读:372
[Fiddler] Error:Content-Length mismatch: Request Header indicated 16 bytes, but client sent 0 bytes.
[Fiddler] Error:Content-Length mismatch: Request Header indicated 16 bytes, but client sent 0 bytes....
分类:其他   时间:2015-03-26 17:37:41    收藏:0  评论:0  赞:0  阅读:397
Flipping Parentheses (线段树 单点更新 区间查询)
题目链接 : 点击打开链接 题目大意 : 给一个括号已经匹配好的序列,每次反转一个括号, 然后让你再次反转一个括号再次使得括号匹配,并且你反转的位置尽可能的靠近左端。 可以对于每个位置,记录它之前的左括号的数量减去右括号的数量,这个序列合法的条件就是每个位置不会出现值小于0的情况。最后一位一定是0. 如果他反转的是右括号,这个位置变成左括号之后 你需要找到一个左括号把它反成右括号...
分类:其他   时间:2015-03-26 17:37:01    收藏:0  评论:0  赞:0  阅读:267
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!