ens-ulm-1-2015

google hashcode 2015 source for team ens-ulm-1
git clone https://a3nm.net/git/ens-ulm-1-2015/
Log | Files | Refs

commit 8564c3889a23b75f8669918822de4fb1763540cd
parent 5ad15d898991b6e4ac082808777e63b4652c13f7
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 28 Mar 2015 12:24:53 +0100

Merge branch 'master' of github.com:a3nm/ens-ulm-1

Diffstat:
auguste/dc_sol.in | 1331+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
auguste/optim.cpp | 180+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
contest/auguste/map.txt | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 1586 insertions(+), 0 deletions(-)

diff --git a/auguste/dc_sol.in b/auguste/dc_sol.in @@ -0,0 +1,1331 @@ +16 100 80 45 625 +10 23 +0 40 +4 40 +3 57 +11 78 +10 82 +14 27 +1 39 +6 75 +0 47 +3 49 +8 8 +0 42 +3 18 +10 39 +8 71 +3 52 +9 42 +12 95 +0 10 +12 89 +11 17 +5 44 +2 48 +15 31 +5 38 +1 48 +1 54 +13 55 +9 65 +12 91 +11 67 +8 57 +15 56 +6 5 +8 83 +13 27 +9 89 +13 78 +9 23 +11 27 +0 73 +3 64 +4 63 +1 27 +3 72 +1 61 +4 44 +10 17 +5 83 +5 92 +3 35 +4 27 +14 98 +10 36 +9 74 +2 73 +11 66 +2 61 +6 7 +15 83 +8 91 +10 95 +13 48 +12 41 +3 66 +0 51 +5 4 +4 28 +3 37 +15 8 +14 2 +5 3 +10 48 +6 33 +14 63 +7 34 +4 23 +3 94 +8 98 +2 28 +5 55 +2 40 +3 18 +1 6 +4 68 +3 18 +2 40 +3 60 +5 25 +4 60 +3 27 +4 24 +3 36 +5 95 +2 26 +1 19 +5 45 +4 56 +1 17 +3 51 +3 15 +2 10 +5 95 +5 45 +1 19 +5 30 +3 18 +4 68 +1 12 +3 27 +5 55 +2 26 +4 32 +2 40 +4 48 +3 18 +2 20 +3 24 +2 12 +4 32 +5 90 +1 8 +4 32 +1 19 +3 36 +4 68 +1 6 +3 33 +3 48 +4 80 +1 11 +2 36 +2 16 +3 33 +2 16 +5 60 +5 65 +1 20 +5 100 +5 90 +1 12 +2 22 +1 11 +5 45 +4 48 +3 60 +5 65 +4 28 +2 40 +3 39 +4 20 +3 39 +5 35 +5 30 +1 14 +4 32 +1 19 +2 28 +4 44 +3 39 +5 40 +4 32 +2 30 +2 20 +4 24 +3 60 +5 30 +2 18 +5 95 +5 50 +1 18 +4 56 +5 75 +1 18 +2 30 +5 35 +1 6 +3 27 +4 64 +2 30 +2 24 +5 90 +1 11 +2 10 +4 60 +2 32 +3 33 +1 6 +5 95 +3 54 +3 21 +1 9 +5 85 +5 95 +2 16 +1 17 +5 55 +4 28 +5 90 +5 85 +5 25 +4 40 +5 85 +5 85 +2 34 +1 18 +5 40 +5 60 +2 34 +2 10 +1 10 +5 100 +2 30 +2 40 +3 60 +1 20 +1 20 +2 12 +3 48 +2 28 +3 33 +3 27 +4 20 +5 65 +4 64 +4 40 +1 15 +2 20 +5 80 +2 18 +3 33 +2 14 +3 60 +4 76 +4 36 +3 15 +2 22 +3 45 +3 36 +2 24 +5 85 +1 6 +3 45 +2 36 +4 60 +2 16 +1 8 +3 54 +1 11 +4 32 +4 48 +2 30 +1 17 +4 24 +3 21 +5 65 +1 8 +5 60 +5 75 +5 70 +5 95 +4 64 +3 54 +3 57 +4 48 +2 16 +4 68 +3 45 +2 12 +2 18 +2 26 +1 8 +4 64 +1 11 +3 33 +2 22 +5 70 +4 72 +4 44 +1 10 +4 72 +5 55 +4 52 +4 32 +2 22 +1 10 +4 44 +1 12 +1 14 +1 11 +3 15 +4 28 +3 15 +2 16 +2 34 +2 34 +5 45 +1 5 +3 60 +2 30 +4 60 +4 80 +1 5 +1 7 +4 56 +2 32 +4 28 +4 64 +1 18 +5 30 +1 9 +4 80 +2 32 +1 16 +4 24 +4 72 +4 24 +5 85 +2 22 +2 26 +2 36 +5 30 +5 75 +5 80 +3 48 +5 45 +5 65 +3 33 +4 36 +5 90 +1 19 +2 24 +4 44 +1 18 +1 8 +4 40 +5 80 +2 10 +5 30 +4 48 +4 64 +4 48 +4 24 +2 32 +2 28 +3 39 +3 48 +2 32 +2 18 +1 8 +1 13 +4 28 +2 24 +4 80 +3 27 +1 8 +2 14 +1 13 +2 40 +3 48 +1 18 +3 54 +3 36 +3 21 +1 20 +3 54 +3 18 +4 20 +1 14 +2 40 +1 17 +4 68 +2 26 +3 36 +5 100 +2 28 +4 64 +5 40 +2 30 +1 7 +1 5 +3 42 +2 16 +4 64 +3 45 +5 85 +4 60 +5 55 +3 45 +5 90 +1 7 +2 32 +3 27 +1 16 +4 80 +3 36 +1 5 +3 30 +2 12 +5 90 +3 60 +5 75 +2 10 +4 48 +4 76 +1 14 +4 48 +1 10 +2 30 +5 50 +4 36 +5 90 +3 36 +2 20 +5 55 +3 60 +4 52 +3 24 +2 34 +4 68 +2 26 +5 60 +4 24 +5 70 +2 14 +3 39 +1 20 +5 60 +1 18 +3 48 +3 27 +5 100 +2 26 +2 38 +3 57 +5 45 +4 44 +5 65 +5 45 +2 28 +5 60 +1 13 +2 26 +3 36 +2 16 +4 56 +2 34 +1 16 +4 68 +2 30 +5 100 +3 15 +3 42 +5 90 +3 39 +3 48 +3 45 +1 12 +5 50 +4 60 +5 90 +5 55 +2 32 +4 72 +1 6 +4 76 +5 80 +3 18 +4 72 +3 48 +5 25 +4 36 +2 14 +3 42 +4 28 +1 18 +4 32 +5 35 +3 27 +2 10 +5 95 +4 28 +3 30 +3 45 +3 27 +5 40 +2 24 +2 28 +3 60 +2 40 +4 36 +3 45 +4 20 +4 48 +5 45 +4 56 +2 30 +4 60 +4 60 +5 75 +5 75 +2 24 +3 48 +1 9 +4 28 +1 13 +5 65 +5 90 +2 36 +3 51 +4 40 +1 20 +1 20 +5 80 +5 100 +5 50 +4 20 +3 36 +4 60 +3 54 +5 30 +2 10 +5 65 +5 40 +1 18 +5 45 +3 21 +5 45 +3 18 +5 35 +3 45 +4 80 +3 48 +1 11 +1 12 +3 60 +1 10 +3 60 +5 30 +4 52 +5 50 +2 16 +1 18 +3 45 +4 56 +1 17 +2 14 +3 18 +4 32 +2 36 +2 14 +5 25 +5 35 +1 9 +1 15 +1 5 +4 32 +2 14 +1 16 +3 48 +3 51 +3 18 +3 60 +1 17 +5 65 +3 60 +1 12 +3 45 +3 57 +1 6 +4 24 +2 30 +3 30 +5 65 +3 42 +1 16 +5 75 +4 64 +2 24 +2 20 +3 33 +1 11 +4 40 +1 19 +1 18 +1 6 +4 68 +3 42 +3 30 +1 10 +4 68 +5 80 +5 70 +2 28 +2 30 +2 12 +5 50 +4 56 +5 90 +5 90 +4 60 +1 19 +5 45 +1 16 +2 20 +1 18 +3 33 +1 15 +1 16 +2 22 +2 20 +4 68 +3 18 +1 7 +4 60 +2 30 +3 36 +2 34 +1 11 +2 30 +3 45 +1 11 +3 15 +2 16 +1 9 +2 10 +4 28 +2 32 +3 54 +5 30 +5 25 +1 19 +5 70 +3 48 +3 18 +1 10 +5 70 +5 95 +1 18 +2 28 +3 33 +2 20 +2 14 +3 18 +3 57 +2 32 +5 90 +2 14 +1 14 +4 60 +1 17 +3 51 +4 48 +5 70 +4 56 +5 75 +1 6 +3 27 +2 10 +3 27 +3 15 +5 30 +5 90 +4 52 +3 39 +4 76 +3 51 +4 40 +3 21 +1 6 +5 50 +4 52 +1 8 +3 36 +3 21 +2 18 +3 30 +3 51 +4 24 +1 15 +2 32 +4 76 +5 50 +3 21 +2 40 +4 44 +3 60 +2 22 +4 72 +4 72 +4 60 +3 45 +3 30 +2 14 +2 40 +3 24 +1 6 +5 30 +4 72 +5 25 +2 34 +1 11 +1 18 +4 68 +8 34 44 +12 59 9 +1 3 3 +-1 +-1 +2 92 9 +-1 +0 4 4 +0 18 10 +-1 +7 47 4 +15 0 24 +-1 +11 3 29 +2 5 33 +8 96 5 +1 26 22 +14 78 43 +8 76 39 +2 47 6 +3 81 7 +-1 +-1 +3 5 33 +15 9 17 +1 38 24 +-1 +-1 +4 57 8 +9 41 3 +15 3 31 +12 74 4 +9 20 8 +15 72 5 +0 11 7 +11 40 44 +-1 +13 4 31 +15 59 1 +-1 +-1 +4 17 43 +13 99 4 +15 92 38 +0 50 25 +10 86 24 +4 49 15 +-1 +12 26 35 +6 14 1 +1 49 17 +8 90 16 +3 16 43 +15 57 0 +12 11 29 +15 47 24 +11 68 11 +10 18 33 +0 2 2 +0 56 19 +5 5 39 +10 15 28 +11 92 23 +11 16 10 +15 14 20 +11 44 6 +1 22 11 +10 0 37 +-1 +0 6 5 +9 69 20 +-1 +9 49 9 +-1 +-1 +6 99 10 +15 76 13 +1 37 23 +8 26 14 +12 46 32 +9 55 42 +-1 +15 84 22 +6 73 20 +13 10 18 +-1 +0 33 15 +-1 +14 15 20 +2 0 32 +13 79 10 +2 17 41 +8 58 1 +7 94 22 +0 97 36 +7 0 33 +-1 +-1 +14 34 0 +5 63 22 +6 67 31 +9 72 0 +3 25 35 +9 64 26 +-1 +7 59 18 +5 33 19 +12 17 10 +-1 +1 93 31 +3 19 44 +-1 +13 46 0 +4 84 17 +2 10 34 +15 53 39 +2 72 7 +12 79 5 +-1 +2 79 3 +4 64 28 +-1 +13 34 41 +4 69 29 +4 74 30 +2 84 8 +1 99 38 +-1 +11 58 1 +4 31 1 +-1 +12 90 2 +1 55 18 +6 59 19 +0 8 6 +0 15 9 +1 0 0 +0 1 1 +-1 +6 11 0 +8 24 13 +12 8 28 +14 28 36 +-1 +10 10 32 +5 84 10 +13 38 13 +5 42 32 +13 2 24 +6 49 5 +13 53 11 +11 96 3 +-1 +1 28 12 +1 84 29 +14 46 32 +-1 +12 0 14 +7 17 6 +10 75 2 +10 64 7 +4 79 16 +-1 +7 14 39 +2 18 42 +7 23 16 +15 39 3 +15 6 22 +2 22 44 +11 63 35 +-1 +11 10 42 +6 78 29 +3 48 1 +-1 +-1 +10 49 4 +11 99 19 +11 48 7 +7 79 32 +9 15 12 +0 92 31 +5 79 9 +3 22 34 +1 74 26 +11 22 31 +15 37 44 +2 96 10 +6 86 37 +-1 +13 74 12 +8 88 4 +14 26 41 +5 71 24 +11 64 36 +12 20 26 +11 94 24 +9 24 13 +2 37 21 +12 33 39 +12 92 21 +4 8 41 +12 54 40 +9 90 35 +15 88 37 +11 88 41 +12 97 13 +12 42 38 +7 99 23 +3 65 20 +11 65 39 +-1 +-1 +-1 +15 49 31 +4 33 2 +5 0 41 +15 32 15 +-1 +1 19 10 +6 29 6 +7 43 19 +0 36 16 +-1 +15 30 30 +8 84 2 +5 25 2 +-1 +5 67 23 +1 60 36 +-1 +13 47 1 +0 52 18 +4 42 4 +4 22 35 +-1 +2 41 22 +-1 +6 0 41 +11 84 2 +9 43 29 +2 20 43 +-1 +7 89 15 +6 54 21 +6 8 44 +14 93 25 +10 54 5 +12 23 27 +14 50 33 +3 58 22 +0 48 23 +9 98 25 +12 50 33 +1 98 37 +15 7 18 +13 49 3 +6 34 14 +-1 +-1 +11 6 34 +5 93 12 +10 96 9 +-1 +4 96 31 +8 36 9 +9 58 43 +5 35 20 +4 98 32 +13 76 25 +14 99 13 +5 99 17 +-1 +10 34 18 +0 43 17 +14 37 1 +15 29 30 +-1 +8 7 41 +1 7 5 +5 54 25 +3 10 39 +2 34 38 +10 66 26 +-1 +0 0 0 +2 25 35 +-1 +-1 +6 98 9 +0 13 8 +3 36 0 +5 15 42 +8 80 19 +10 83 23 +0 66 21 +8 30 28 +5 88 11 +-1 +6 69 32 +15 81 30 +-1 +8 47 37 +15 43 28 +5 75 3 +7 5 0 +4 89 18 +7 55 8 +12 84 22 +6 92 25 +2 74 2 +15 80 16 +5 31 7 +14 31 39 +5 2 44 +1 40 15 +10 78 21 +-1 +13 14 2 +-1 +2 62 0 +0 27 13 +8 14 24 +-1 +11 18 43 +0 84 29 +3 99 28 +11 36 18 +8 99 34 +6 63 42 +14 3 7 +14 64 21 +2 67 1 +10 89 3 +13 6 17 +12 69 19 +0 21 11 +9 79 30 +15 62 19 +4 29 0 +4 53 34 +9 39 28 +11 73 12 +-1 +9 5 7 +-1 +9 66 17 +0 3 3 +11 79 25 +0 71 34 +5 48 37 +14 40 37 +1 62 19 +9 45 18 +1 72 25 +0 74 26 +14 68 34 +12 37 37 +10 29 15 +14 73 42 +8 32 29 +11 53 0 +7 33 20 +9 47 44 +10 69 27 +15 41 8 +8 92 21 +3 53 4 +5 24 1 +4 35 13 +6 31 7 +0 61 20 +-1 +8 41 35 +3 30 36 +9 61 31 +5 60 27 +7 20 7 +10 16 29 +13 89 27 +7 67 42 +3 38 37 +12 64 15 +5 29 6 +4 0 39 +-1 +0 88 30 +6 24 13 +-1 +4 4 40 +5 51 38 +-1 +14 58 6 +-1 +8 50 38 +-1 +0 72 35 +15 68 4 +-1 +14 17 18 +-1 +1 88 30 +-1 +13 20 21 +6 95 26 +14 43 38 +-1 +10 45 6 +8 28 20 +0 24 12 +1 9 6 +14 54 2 +7 8 1 +-1 +11 28 17 +14 83 11 +8 66 26 +6 71 15 +7 35 41 +7 27 17 +7 84 40 +8 0 33 +10 37 44 +5 45 36 +14 0 24 +-1 +8 70 30 +10 59 22 +3 43 38 +3 14 42 +3 87 3 +13 42 30 +1 1 1 +1 2 2 +6 44 4 +1 67 20 +13 69 16 +-1 +11 0 28 +7 71 43 +2 31 37 +-1 +-1 +10 40 19 +-1 +0 99 38 +15 24 9 +-1 +15 19 40 +-1 +-1 +7 2 44 +1 44 16 +6 17 39 +11 15 30 +8 82 8 +1 34 14 +12 93 42 +0 30 14 +-1 +9 94 36 +13 84 26 +15 45 23 +2 16 40 +6 80 35 +8 72 27 +2 45 4 +-1 +-1 +-1 +3 12 41 +-1 +-1 +-1 +14 1 31 +6 6 33 +-1 +15 96 18 +-1 +5 23 0 +5 39 35 +2 89 27 +-1 +1 13 8 +2 46 5 +10 24 40 +1 31 13 +9 22 24 +7 11 27 +1 77 27 +-1 +-1 +6 76 28 +13 31 43 +10 5 38 +8 44 36 +4 41 38 +8 9 23 +6 20 40 +9 87 1 +13 8 20 +12 2 30 +11 14 14 +13 56 8 +0 41 22 +2 15 39 +-1 +3 90 11 +8 38 10 +13 17 6 +12 96 41 +3 95 12 +6 39 2 +9 10 11 +7 31 11 +6 61 34 +-1 +13 64 29 +8 62 25 +5 10 40 +4 12 42 +7 75 31 +1 25 21 +14 88 12 +4 39 37 +12 98 23 +0 98 37 +12 14 16 +3 51 31 +4 26 36 +11 86 21 +13 0 14 +5 19 43 +-1 +15 55 29 +7 63 34 +6 65 43 +10 92 8 +4 24 44 +11 26 27 +5 97 8 +6 89 38 +10 81 13 +-1 +15 51 36 +13 26 23 +-1 +-1 +4 94 21 +2 28 36 +-1 +-1 +0 49 24 +9 29 14 +5 57 26 +-1 +12 94 43 +9 34 16 +3 0 32 +1 53 35 +8 5 12 +12 5 8 +13 12 44 +-1 +-1 +0 77 27 +4 61 5 +3 67 23 +-1 +5 43 29 +7 39 30 +3 50 2 +3 84 25 +11 32 20 +9 0 6 +8 53 0 +8 19 3 +15 82 10 +14 20 44 +-1 +14 23 23 +-1 +-1 +3 73 24 +9 75 41 +9 52 34 +1 80 28 +3 78 6 +13 60 28 +-1 +-1 +14 8 14 +9 83 10 +14 62 5 +10 72 39 +-1 +14 13 17 +13 23 34 +2 86 26 +-1 +3 63 15 +5 27 33 +0 80 28 +13 94 35 +-1 +1 11 7 +12 29 36 +1 16 9 +11 90 13 +2 49 23 +2 53 24 +7 51 5 +6 83 36 +13 28 42 +-1 +1 5 4 +15 65 41 +-1 +-1 +2 57 25 +-1 +3 55 5 +10 47 41 +3 11 40 +4 45 14 diff --git a/auguste/optim.cpp b/auguste/optim.cpp @@ -0,0 +1,180 @@ +#include <vector> +#include <cstdio> +#include <algorithm> +#include <map> + +using namespace std; + +#define MAXN 1002 + +typedef pair<int,int> pii; +typedef pair<int,pii> piii; + +struct Server{ + int id, z, c; + Server(int id=0, int z=0, int c=0) : id(id), z(z), c(c) {} + bool operator< (const Server &s) const{ + if (z*s.c == s.z*c) return z < s.z; + return z*s.c < s.z*c; + } +}; + +struct comp{ + bool operator() (const Server &a, const Server &b){ + return a.z < b.z; + } +}; + +int main() { + int R, S, U, P, M; + vector<Server> serv; + char grid[MAXN][MAXN]; // row, col + int capa[MAXN]; + int gcapa[MAXN][MAXN]; // row, group + int fposr[MAXN], fposc[MAXN], fgroup[MAXN]; + + scanf("%d", &R); + scanf("%d", &S); + scanf("%d", &U); + scanf("%d", &P); + scanf("%d", &M); + for (int i = 0; i < U; i++) { + int r, s; + scanf("%d", &r); + scanf("%d", &s); + grid[r][s] = 1; + } + for (int i = 0; i < M; i++) { + int z, c; + scanf("%d", &z); + scanf("%d", &c); + serv.push_back(Server(i, z, c)); + } + + for (int i = 0; i < M; i++) { + fposr[i] = fposc[i] = fgroup[i] = -1; + } + + //read solution + for(int i = 0; i < M; i++) + { + int ar, as, ap; + scanf("%d", &ar);//'x' remplacé par -1 + if(ar != -1) + { + fposr[i] = ar; + scanf("%d%d", &fposc[i], &fgroup[i]); + } + } + +/* sort(serv.begin(), serv.end()); + + // now keep only the servers we will use + int free = R * S - U; + + int i; + for (i = 0; i < M; i++) { + free -= serv[i].c; + if (free <= 0) + break; + } + + sort(serv.begin(), serv.begin() + i, comp()); + + for (int i = 0; i < M; i++) { + fposr[i] = fposc[i] = fgroup[i] = -1; + } + + for (int i = 0; i < M; i++) { + // place server i + // choose the group with lowest guaranteed + int guar[MAXN]; + for (int j = 0; j < P; j++) + guar[j] = capa[j]; + for (int j = 0; j < R; j++) + for (int k = 0; k < P; k++) + guar[k] = min(guar[k], capa[k] - gcapa[j][k]); + int mguar = guar[0], idx = 0; + for (int j = 0; j < P; j++) + if (guar[j] < mguar) { + mguar = guar[j]; + idx = j; + } + // idx is the group + // choose where to place server + vector<pii> v; + int wherecol = -1, whererow = -1; + for (int j = 0; j < R; j++) + v.push_back(make_pair<int, int>(gcapa[j][idx], j)); + sort(v.begin(), v.end()); + for (int j = 0; j < R; j++) { + // try to place in row + int row = v[j].second; + int contig = 0; + int k; + for (k = 0; k < S; k++) { + if (!grid[row][k]) + contig++; + else + contig = 0; + if (contig == serv[i].z) { + // ok, can place + break; + } + } + if (contig == serv[i].z) { + // do place + wherecol = k - (serv[i].z - 1); + whererow = row; + break; + } + } + if (wherecol >= 0 && whererow >= 0) { + // yeah, we can place it! update + capa[idx] += serv[i].c; + gcapa[whererow][idx] += serv[i].c; + for (int k = 0; k < serv[i].z; k++) + grid[whererow][wherecol+k] = 2; + fposr[serv[i].id] = whererow; + fposc[serv[i].id] = wherecol; + fgroup[serv[i].id] = idx; + } else { + printf("CANNOT PLACE!!\n"); + } + } +*/ + + + int fguar[MAXN]; + for (int j = 0; j < P; j++) + fguar[j] = capa[j]; + for (int j = 0; j < R; j++) + for (int k = 0; k < P; k++) + fguar[k] = min(fguar[k], capa[k] - gcapa[j][k]); + int mfguar = fguar[0], idx = 0; + for (int j = 0; j < P; j++) + if (fguar[j] < mfguar) { + mfguar = fguar[j]; + } + + printf("FINAL: %d\n", mfguar); + + for (int i = 0; i < R; i++) { + for (int j = 0; j < S; j++) + putchar(grid[i][j] == 1? 'X' : (grid[i][j] == 2 ? 'O' : ' ')); + putchar('\n'); + } + + printf("CUT\n"); + + // display sol + for (int i= 0 ; i < M; i++) { + if (fposr[i] >= 0) + printf("%d %d %d\n", fposr[i], fposc[i], fgroup[i]); + else + printf("x\n"); + } + + return 0; +} + diff --git a/contest/auguste/map.txt b/contest/auguste/map.txt @@ -0,0 +1,75 @@ +.......................................................................................###############################..........................................######..################....#####.............................................................##.####.#.....#...................##.......... +.........................................................................................#############################.........................................#########################...#####..............................................................##.##.#.......#.##.................##........# +#......................#.................................................................###########.##.##############.........................................########################...######.................................................................#.###.#....#.##..................#.......## +#........................#................................................................#########..#################..........................................#######.##############....######.............................................................###...#.#.##....###..................#......##. +.........................#................................................................##########..################............................................###################.....######............................................................#..#.#####.#...###.#.........................##. +#....#.....................................................................................#######..#################............................................#######.############.....######.................................................................##.##.##...#.##..................##........ +.#..........................................................................................######..#################.............................................#######.##########......#####.............................................................##.#...#.##.##.##.#.#..................#......#. +...........................................................................................#.####.#.#.###############............................................#.####..###########.......####......##.....................................................#.####.....#.#.#.####.............#....#........ +...........................................................................................#.####.###.###############.............................................####.############.......#####......##...................................................#..###.....#.##..#..####............###........... +....#......................................................................................##.#######.###.##########...............................................#.##.#.##########......#####.....#..................................................###.....##.###.##.##.####.##............#.#.......... +...........................................................................................########..###############...............................................###.#############......#####..........................................................#..##..##...##.#....#..#.#............###.......... +.......................#...................................................................###.#####################...............................................#################......####........................................................######..##.#####...#.#..#.#.##............##.......... +...........................................................................................#########################..............................................#.##.#..##########......####........................................................###....###....####.###...##.##........................ +...........................................................................................#########.#############.................................................###.#############......####.......................................................#.##.###.##..#..#.#####..#....#........................ +..........................#................................................................######################..................................................#.##.############......####.........................................................##.###.###.##.#.#..#######..##....................... +...........................................................................................####################.........................................................############......####.......................................................#.#######.##.....#..###.###..#.#....................... +............................................................................................#.#################....................................................##.#############.......####.......................................................#.###.##.#####.###.#.#.###.######...................... +...........................................................................................##.################.....................................................###.###########.........##.........................................................###.#...#.########..#.###..##.##...................... +...........................................................................................##.################.......................................................###.#########....................................................................#..####..#.#.#.#####.##..#.#..##...................... +...........................................................................................###################.....................................................###..##########...................................................................#####...##..#.##.#....#.#....####...................... +..........................................................................................####################.....................................................#.##.##########.....................................................................#######.###.###.#.#...###..####...................... +..........................................................................................##..################..........................................................#.########....................................................................#####...#..#.#.#.#...##.##.#####...................... +..........................................................................................##.#################......................................................#############....................................................................#..#.#.#..##.#..##.###.###.....##...................... +..........................................................................................##.################........................................................############....................................................................#...####.###.#.####..###.#.######...................... +..........................................................................................##.################.......................................................#.#D#.#######.....................................................................#.#....#.###..#.#.#.###....#.###...................... +..........................................................................................###################.......................................................#.##.#######......................................................................#.##...#.#..##.####.###.#..#####...................... +..........................................................................................###################.........................................................#.#..#####......................................................................#.#....#####....###....###..####...................... +..........................................................................................##################.........................................................###.#######......................................................................###...######.#..#.####....######...................... +..........................................................................................#################..........................................................#.#.#.####.......................................................................####.#####.......###.###########....#................. +..........................................................................................#################..........................................................#..#.#####.......................................................................#..#.#.#.........###.###.#.#####...................... +..........................................................................................################...........................................................####.####........................................................................####.##..........####..##.#####....................... +..........................................................................................################...........................................................########........................................................................###.####..........####..#..#####....................... +..........................................................................................################...........................................................#######.........................................................................####...............##.##..#.####....................... +..........................................................................................################...........................................................###.............................................................................####...............##.##.####.#..................#..... +.........................................................................................################..............................................................................................................................................##...............#####..#####..................#..... +.........................................................................................##############..................................................................................................................................................................##.########..................##.... +.........................................................................................###.##########.....................................................................................................................................................................########..................##.... +.........................................................................................#####.########....................................................................................................................................................................#..#####....................##... +........................................................................................###############....................................................................................................................................................................########....................##... +........................................................................................####.#..#######....................................................................................................................................................................########....................###.. +........................................................................................####.##.#######....................................................................................................................................................................#######.....................###.. +........................................................................................#######.######.....................................................................................................................................................................######......................####. +........................................................................................#######.#####..........................................................................................................................................................................#.......................####. +........................................................................................######.####...................................................................................................................................................................................................####.. +........................................................................................#######..##....................................................................................................................................................................................................###.. +........................................................................................##########......................................................................................................................................................................................................#... +........................................................................................###..#..##.............................................................................................................................................................................###...................####... +........................................................................................###.##.................................................................................................................................................................................###...................###.... +........................................................................................######.#...............................................................................................................................................................................##...................###..... +........................................................................................#####.###...............................................................................................................................................................................##..................##...... +........................................................................................#########...............................................................................................................................................................................##.......................... +........................................................................................#.#..###...............................................................................................................................................................................###...................#...... +.......................................................................................##.#....#................................................................................................................................................................................#...................###..... +............................................................................................#.......................................................................................................................................................................................................#....... +.........................................................................................#.####...................................................................................................................................................................................................#.#....... +.........................................................................................##.###...................................................................................................................................................................................................###....... +.........................................................................................###.#....................................................................................................................................................................................................###....... +.........................................................................................###.#...................................................................................................................................................................................................####....... +...........................................................................................#.....................................................................................................................................................................................................###........ +.........................................................................................##.#............................................................................................................................................................................................................... +.........................................................................................####............................................................................................................................................................................................................... +.........................................................................................#..#.#............................................................................................................................................................................................................. +.........................................................................................#####.............................................................................................................................................................................................................. +.........................................................................................##................................................................................................................................................................................................................. +........................................................................................#...#............................................................................................................................................................................................................... +...........................................................................................#................................................................................................................................................................................................................ +............................................................................................................................................................................................................................................................................................................ +..........................................................................................##................................................................................................................................................................................................................ +.........................................................................................####............................................................................................................................................................................................................... +.........................................................................................####............................................................................................................................................................................................................... +.........................................................................................####............................................................................................................................................................................................................... +.........................................................................................####............................................................................................................................................................................................................... +...........................................................................................##............................................................................................................................................................................................................... +............................................................................................................................................................................................................................................................................................................ +............................................................................................#...............................................................................................................................................................................................................