Skip to content

Instantly share code, notes, and snippets.

@oldsnuke
oldsnuke / input.cpp
Created August 16, 2011 02:25
voronoi
#include<cstdlib>
#include<cstdio>
#include<vector>
#include<algorithm>
#include <ctime>
using namespace std;
bool map[500][500];
@oldsnuke
oldsnuke / a.txt
Created June 28, 2011 09:57
supercon 2011 input
200 200 200
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 2
class POLICE {
public:
int dis[200], disp[5], nex[200], t_nex[200], ppos[5], ptic[5];
vector<int> xkoh[25];
bool used[200];
vector<int> POLICE_AI (int N, int S, const vector<int> WAY[4][200], const vector<int>& START, int TURN, int X_POS, int X_USED_TICKET[25], const int P_POS[5], const int X_TICKET[5], const int P_TICKET[5][3]){
const int INF = 10000000;
class Mr_X {
public:
vector<int> Mr_X_AI(int N, int S, const vector<int> WAY[4][200], const vector<int>& START, int TURN, int X_POS, const int P_POS[5], const int X_TICKET[5], const int P_TICKET[5][3]){
vector<int> X, X_list[2];
int list_N = 0, P_NUM = 5;
bool CHECK;
static int lastappear=0;
//static int kakurankaisu=0;//ブラックで撹乱した回数。少なかったら積極的に撹乱?
@oldsnuke
oldsnuke / gist:879384
Created March 21, 2011 12:28
POLICE VS AI
#include <cstdio>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
@oldsnuke
oldsnuke / gist:879258
Created March 21, 2011 10:21
Mr.X vs AI
#include <cstdio>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
199
345
1 8
1 9
2 10
2 20
3 4
3 11
3 12
4 13
@oldsnuke
oldsnuke / gist:854387
Created March 4, 2011 09:23
SCOTLAND YARD
#include <cstdio>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>