• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
For_
博客园    首页    新随笔    联系   管理    订阅  订阅
2011年8月25日
关于#param pack n(转载)
摘要: 转载自http://hi.baidu.com/love_mj/blog/item/c4b294fd7bb94e1a08244d31.html关于 #param pack n: #pragma pack(4) class TestB { public: int aa; char a; short b; char c; }; int nSize = sizeof(TestB); 这里nSize结果为12,在预料之中。 现在去掉第一个成员变量为如下代码: #pragma pack(4) class TestC { public: char a; ... 阅读全文
posted @ 2011-08-25 10:03 For_ 阅读(2510) 评论(0) 推荐(0)
2011年4月21日
1728 逃离迷宫 好无语啊好无语
摘要: 1 #include<cstdio>//只是因为 k,y1,x1,y2,x2的原因。 2 #include<queue> 3 #include<cstring> 4 using namespace std; 5 int m,n,time; 6 int dir[4][2]={{0,1},{1,0},{-1,0},{0,-1}};//右下上左 0,1,2,3 7 char map[110][110]; 8 int hash[110][110]; 9 struct In10 {11 int x,y,k,time;12 };13 In s,e; 14 int bfs 阅读全文
posted @ 2011-04-21 16:02 For_ 阅读(168) 评论(0) 推荐(0)
hdu2102 A计划
摘要: 1 #include<cstdio> //hdu2102 2 #include<cstring> 3 #include<queue> 4 using namespace std; 5 const int INF=0x03f3f3f3f; 6 int n,m,t; 7 char map[2][12][12]; 8 int hash[2][12][12]; 9 int dir[4][2] = {{0,1},{1,0},{0,-1},{-1,0}}; 10 11 struct In 12 { 13 int x,y,z,t; 14 }; 15 In e; 16 in 阅读全文
posted @ 2011-04-21 13:05 For_ 阅读(223) 评论(2) 推荐(1)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3