题意:一个房间由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
资格赛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
#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
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
#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
#include #include using namespace std;int
main(){ int pid = GetCurrentProcessId(); auto path =
Plug::GetCurrentPath();//返回std::wstring path +...
分类:
其他好文 时间:
2014-06-07 03:08:40
阅读次数:
288
#include #include #include #include using
namespace std;int main(){
//boost::interprocess::shared_memory_object类是按照单个字节的方式读写共享内存,用起来不方便 boost::i...
分类:
其他好文 时间:
2014-05-30 12:56:14
阅读次数:
225
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
题意:给定每一步的定方向与初始位置 让求出去房间
或者进入循环的步数直接模拟#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