hiho week 126 register

Ended

Participants:173

Verdict:Accepted
Score:100 / 100
Submitted:2016-11-29 19:43:12

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <unordered_map>
#include <unordered_set>
using namespace std;
const double PI = 3.14159265;
const double R = 6e6;
const double P = PI * R * 2.0;
const double DX = 180.0 * 575 / P ;
const double DY = 360.0 * 1150 / P;
const double ARC = 500; 
const double dxs[3] = {DX, 0, -DX};
const double dys[3] = {-DY, 0, DY};
const int PRECISION = 6;
const char base32[32] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 
  'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k', 'm', 'n', 'p', 'q', 'r', 's',
  't', 'u', 'v', 'w', 'x', 'y', 'z'};
unordered_set<string> visited;
unordered_map<char, int> decimal;
char geohash[256];
struct TrieNode {
  TrieNode():children(32, NULL), coordinates(){}
  vector<TrieNode*> children;
  vector<pair<double, double> > coordinates;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX