走格子和算面积合二为一了,不过没有POJ上另外一道走格子的题恶心,名字叫宇航员,至今没ac,wa的代码还躺在我桌面上= =。
自认为这篇代码写得比较工整,突然想搞计算几何了~
AC代码:
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <string>
#define MAXN 1000000
using namespace std;
//8北, 2南, 6东, 4西, 9东北, 7西北, 3东南, 1西南
const int dir[10][2] = {{0, 0}, {-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {0, 0}, {1, 0}, {-1, 1}, {0, 1}, ......
阅读全文