hiho week 125 register

Ended

Participants:153

Verdict:Accepted
Score:100 / 100
Submitted:2016-11-20 18:39:42

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
#if 1
#include "iostream"
#include "algorithm"
#include "vector"
#include "stdarg.h"
#include "memory.h"
#include "assert.h"
FILE*_a, *_b; int(*scan)(const char*_, ...);
int fscan(const char*_, ...) { va_list _ap; va_start(_ap, _); return vfscanf(_a, _, _ap); }
static struct _1 { _1() { _a = fopen("test.txt", "r");  _ = _a; }bool _; }__1;
static struct _2 { _2() { _b = fopen("autos", "r"); _ = _b && (fread(&_, 1, 1, _b)); }bool _; }__2;
static struct _3 { _3() { __1._ && !__2._ ? scan = fscan : scan = scanf; __2._ ? fopen("autos", "w") : 0; } }__3;
using namespace std;
typedef unsigned long long ll;
typedef vector<int> vi;
#define  rep(i,j,n) for(int i = j;i < n;i++)
#define  per(i,n,j) for(int i = n;i >= j;i--)
const int inf = 0x3f3f3f3f;
const double eps = 1e-9;
static const char ab[] = "0123456789bcdefghjkmnpqrstuvwxyz";
static const char ba[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 0, 17, 18, 0, 19, 20, 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 };
int n, m;
char buf[101];
void en_geohash(const double lat, const double lon, char * dst, const int nbyte) {
    int b = 0;
    double llat = -90.0, rlat = 90.0;
    double llon = -180.0, rlon = 180.0;
    const int k = nbyte * 5;
    int j = 0;
    rep(i, 1, k + 1) {
        if (i & 1) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX