这题目最坑了,我做的A题最坑的一道1,首先输入数据不一定是四位的,泪奔,输入1,222,222,试一试2,在运行过程中需要判定结果是否为0,需要跳出#include#include#includeusing namespace std;void get(char * data,int & max,i...
分类:
其他好文 时间:
2014-08-31 19:57:51
阅读次数:
240
A Round Peg in a Ground Hole
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 5301
Accepted: 1662
Description
The DIY Furniture company specializes in assem...
分类:
其他好文 时间:
2014-08-20 21:08:02
阅读次数:
263
大致思路:首先对于所给的洞的点,判断是否是凸多边形,图形的输入和输出可以是顺时针或者逆时针,而且允许多点共线Debug 了好几个小时,发现如下问题判断三点是否共线,可用斜率公式判断POINT point_A, point_B, point_C; if(point_A.x == poin...
分类:
其他好文 时间:
2014-08-13 22:11:17
阅读次数:
336
Problem Description
This is a simple game.The goal of the game is to roll two balls to two holes each.
'B' -- ball
'H' -- hole
'.' -- land
'*' -- wall
Remember when a ball rolls into a hole, the...
分类:
其他好文 时间:
2014-08-11 21:22:12
阅读次数:
308
1, 年轻人绝对不能懒,要让老板觉得你“好用”。你可以什么都没有,没有背景、没有姿色、不会拍马屁、不会卖萌。。。但是你记住,就算是最黑暗的国企央企,也需要肯干活的人,就算你的老板是个只会溜须拍马、见风使舵、什么都不会还装懂的彻头彻尾的Ass hole,他也能看出来谁能干活,谁能帮他摆平事情,所谓“好...
分类:
其他好文 时间:
2014-07-26 01:10:26
阅读次数:
233
file/hole.c #include "apue.h"#include char buf1[] = "abcdefghij";char buf2[] = "ABCDEFGHIJ";intmain(void){ int fd; if ((fd = creat("file.hole", FILE_M...
分类:
其他好文 时间:
2014-07-18 23:35:26
阅读次数:
193
Exchanger是一个针对线程可以结对交换元素的同步器。每条线程把某个对象作为参数调用exchange方法,与伙伴线程进行匹配,然后再函数返回的时接收伙伴的对象。另外,Exchanger内部实现采用的是无锁算法,能够大大提高多线程竞争下的吞吐量以及性能。
算法实现
基本方法是维持一个“槽”(slot),这个槽是保持交换对象的结点的引用,同时也是一个等待填满的“洞”(hole)。如...
分类:
移动开发 时间:
2014-07-16 17:23:36
阅读次数:
484
raw相比qcow2就缺乏的三个功能,但都能通过别的方式解决:1、加密功能:把raw本身就当普通文件加密之搞定2、快照功能:把raw加入版本管理目录中,具体需要的设置可能稍微有点多。3、宿主机不支持按需打孔模式(hole):这个可以自己根据使用情况来扩展raw的最大值4、硬盘压缩:..
分类:
其他好文 时间:
2014-07-08 11:58:50
阅读次数:
160
终于找到了一份满意的UDP打洞原理解释,附上正文,自己整理了一下源码3.3. UDP hole punching UDP打洞技术The third technique, and the one of primary interest in this document, is widely known...
分类:
其他好文 时间:
2014-06-25 16:57:52
阅读次数:
280
Treasure Hunt IV
Time Limit: 2 Seconds Memory Limit: 65536 KB
Alice is exploring the wonderland, suddenly she fell into a hole, when she woke up, she found there are b - a + 1 treasures...
分类:
其他好文 时间:
2014-05-18 04:09:03
阅读次数:
248