题意:一个房间由m*n个方块组成 每个机器人占据一个方块 这些机器人能够移动 问
这些机器人的移动动作全部完成后 会不会发生冲撞事件解题策略:简单的模拟题目#include#includeusing namespace std;struct
Node{ int x,y; int dir...
分类:
其他好文 时间:
2014-06-07 06:03:49
阅读次数:
205
Stack 一个简单确很有用的数据结构:FILOpackage Stackimport (
"errors" "fmt")const ( defaultLength=100)type Stack struct{ top int size int
element [...
分类:
其他好文 时间:
2014-06-07 05:14:42
阅读次数:
211
实验环境:windows 8.1 pro with Keil 4 and Proteus
7.8 both cracked。步骤:下载联调工具Vdmagdi,安装。keil下Option/Debug,将右侧的单选框点上。proteus
下Debug/Use remote debug monitor点...
分类:
其他好文 时间:
2014-06-07 04:20:40
阅读次数:
318
#include #include struct pos2d{ int x; int
y;};using namespace std;int main(){
//boost::interprocess::shared_memory_object类是按照单个字节的方式读写共享内存,用...
分类:
其他好文 时间:
2014-06-07 03:57:20
阅读次数:
277
当一个较少字节对齐类型的指针强转为一个较多字节对齐的指针类型时,这样有些时候会产生问题。
在arm的平台上,这个问题比较明显,在x86平台上运行后没这个问题typdef struct{int addr;int rdda;}Test_t;int
main(){short int a;short ...
分类:
其他好文 时间:
2014-06-07 03:40:59
阅读次数:
301
struct shareDataEx : shareData{ int index; int
total_size;};typedef managed_shared_memory::segment_manager segment_manager_t;
//段管理器type...
分类:
其他好文 时间:
2014-05-30 11:23:53
阅读次数:
267
先排序预处理,后01背包。 1 #include 2 #include 3 #include 4 5
#define MAX(a, b) (a>b) ? a:b 6 7 int dp[5000]; 8 9 typedef struct {10 int p,
q, v;11 } s...
分类:
其他好文 时间:
2014-05-29 11:40:04
阅读次数:
277
单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。这里主要介绍下在arc下,利用gcd实现单例。第一步:声明一个静态实例staticSoundTool
*_instance;第二步:重写初始化方法+ (id)allocWithZone:(struct _NSZone *)zo...
分类:
移动开发 时间:
2014-05-29 02:49:34
阅读次数:
367
1、初始化一个UITableView1 -
(id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style1 struct CGRect {2
CGPoint origin;3 CGSize size;4 };5 typedef...
分类:
其他好文 时间:
2014-05-29 02:42:20
阅读次数:
254
题目链接说来算是个基础题目,可是还是各种CE,各种WA,基础还是不扎实。附上代码: 1 /** 2 *
Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 *
ListNode *ne...
分类:
其他好文 时间:
2014-05-28 23:56:38
阅读次数:
382