码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
poj 2632
题意:一个房间由m*n个方块组成 每个机器人占据一个方块 这些机器人能够移动 问 这些机器人的移动动作全部完成后 会不会发生冲撞事件解题策略:简单的模拟题目#include#includeusing namespace std;struct Node{ int x,y; int dir...
分类:其他好文   时间:2014-06-07 06:03:49    阅读次数:205
[算法][求积分][复合辛普森公式]
1 //这里f()为被积函数,输入a,b为积分上下限, 2 //eps为计算精度[这里要注意假收敛,一般设小一点好] 3 #include 4 #include 5 #define eps 1e-6 6 using namespace std; 7 double f(double x){ 8...
分类:其他好文   时间:2014-06-07 05:22:57    阅读次数:239
2014百度之星程序设计竞赛
资格赛Energy Conversion水题。#include #include #include #include #include #include #define ll long longusing namespace std;int main(){ int T; scanf("%...
分类:其他好文   时间:2014-06-07 05:10:51    阅读次数:371
boost::interprocess::shared_memory_object(1)(基本类型)
#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
uva10474 - Where is the Marble?
1 #include 2 #include 3 using namespace std; 4 const int Max = 100000; 5 int num[Max]; 6 int find_[Max]; 7 bool found[Max]; 8 int pos[Max] = { 9 ...
分类:其他好文   时间:2014-06-07 03:49:29    阅读次数:250
c itoa和atoi
#include using namespace std;int main(){#if 1 int num = 12345; char str[25];//不要写成char*,因为没有分配空间 itoa(num, str, 10);//10进制字符串 printf("num ...
分类:其他好文   时间:2014-06-07 03:32:09    阅读次数:215
c fopen
#include #include using namespace std;int main(){ int pid = GetCurrentProcessId(); auto path = Plug::GetCurrentPath();//返回std::wstring path +...
分类:其他好文   时间:2014-06-07 03:08:40    阅读次数:288
boost::interprocess::managed_shared_memory(2)(std::string)
#include #include #include #include using namespace std;int main(){ //boost::interprocess::shared_memory_object类是按照单个字节的方式读写共享内存,用起来不方便 boost::i...
分类:其他好文   时间:2014-05-30 12:56:14    阅读次数:225
boost::interprocess::managed_shared_memory(2)(std::deque)
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
poj 1573
题意:给定每一步的定方向与初始位置 让求出去房间 或者进入循环的步数直接模拟#include#includeusing namespace std;int map[11][11];int v[11][11];int dir[4][2]={-1,0,1,0,0,-1,0,1};int main(){ ...
分类:其他好文   时间:2014-05-30 09:03:03    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!