This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node: | |
def __init__(self, val): | |
self.up = bool(val & 1) | |
self.right = bool(val & 2) | |
self.down = bool(val & 4) | |
self.left = bool(val & 8) | |
def rotate(self): | |
self.up, self.right, self.down, self.left = self.right, self.down, self.left, self.up | |
def num(self): | |
return self.up<<0 | self.right<<1 | self.down<<2 | self.left<<3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// and it works with standard algorithms out of the box | |
#include <algorithm> | |
#include <iostream> | |
#include <memory> | |
#include <vector> | |
struct S{ | |
S(){static int N; val = N++;} | |
void f(){std::cout << " " << val << "\n";} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from marisa_trie import Trie | |
valid_squares = [] | |
def recurse(): | |
for row in row_words: | |
yield from recurse_col((row,), (), 1, 0) | |
def recurse_row(rows, cols, y, x): | |
for i in range(y, H): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14874 | |
0 L 4 992 1 | |
0 D 115 992 1 | |
0 L 4 508 1 | |
0 L 4 1300 1 | |
0 D 838 508 1 | |
0 D 838 1300 1 | |
0 L 0 1087 1 | |
0 L 0 1328 1 | |
0 D 295 1087 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 | |
PAINT_LINE 24 63 24 87 | |
PAINT_LINE 29 113 32 113 | |
PAINT_SQUARE 32 171 1 | |
PAINT_LINE 14 116 23 116 | |
PAINT_SQUARE 19 101 5 | |
PAINT_SQUARE 27 138 2 | |
PAINT_SQUARE 28 60 3 | |
PAINT_LINE 25 191 28 191 | |
PAINT_SQUARE 27 175 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
wh, *macierz = open("logo.in").read().splitlines() | |
wh, *macierz = open("right_angle.in").read().splitlines() | |
wh, *macierz = open("learn_and_teach.in").read().splitlines() | |
H, W = map(int, wh.split()) | |
def banalny(macierz, transponowana=False): | |
if transponowana: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <sstream> | |
#include <arpa/inet.h> | |
#include <endian.h> | |
unsigned to_num(const std::string& ip) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 - Kip Ballard | |
61 - Adjournment PLC | |
60 - Democratic Republic of Mead | |
58 - Cellist LLC | |
58 - University of Noway | |
56 - National Markedly Funnest | |
56 - Davenport Versailles | |
56 - Hurst Wilmington | |
56 - Palsying Scowls Union | |
56 - Salyut Apple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119.200.220.130 Democratic Republic of Superhighways Loathings | |
235.130.216.53 Laughing Plows Party | |
232.235.154.169 Center for Oligarchies | |
180.36.238.209 United Fowl Rejoinder | |
142.176.207.13 Salyut Apple | |
72.167.76.141 Shrugged Oversimplifies Institute | |
109.17.148.205 United Gangplank | |
221.189.18.4 Surmountable Inc | |
246.152.207.6 Downbeats LLC | |
123.85.237.38 Hurst Wilmington |