This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cassert> | |
| #include <map> | |
| #include <set> | |
| #include <unordered_set> | |
| using namespace std; |
This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cmath> | |
| #include <cassert> | |
| using namespace std; | |
| double EPS = 1e-5; |
This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cassert> | |
| #include <list> | |
| #include <unordered_set> | |
| using namespace std; | |
| struct point { |
This file contains hidden or 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
| long long det3(long long a, long long b, long long c, | |
| long long d, long long e, long long f, | |
| long long g, long long h, long long i) { | |
| return a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g); | |
| } | |
| long long det4(long long ax, long long bx, long long cx, long long dx, | |
| long long ay, long long by, long long cy, long long dy, | |
| long long az, long long bz, long long cz, long long dz, | |
| long long at, long long bt, long long ct, long long dt) { |
This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| using namespace std; | |
| struct point { | |
| long long x; | |
| long long y; |
This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <random> | |
| #include <cassert> | |
| #include <set> | |
| #include <unordered_set> | |
| #include <map> | |
| using namespace std; |
This file contains hidden or 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 sys | |
| from random import randint | |
| w, h, n = map(int, sys.argv[1:]) | |
| print(w, h, n) | |
| points = [] | |
| for _ in range(n): | |
| x, y = randint(1, w - 1), randint(1, h - 1) |
This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cassert> | |
| #include <list> | |
| #include <unordered_set> | |
| using namespace std; | |
| struct point { |
This file contains hidden or 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 NotMnistCNN(torch.nn.Module): | |
| relu = torch.nn.ReLU() | |
| def __init__(self): | |
| super(NotMnistCNN, self).__init__() | |
| self.conv1 = torch.nn.Conv2d(3, 8, kernel_size=3, stride=1, padding=1) | |
| self.conv2 = torch.nn.Conv2d(8, 8, kernel_size=3, stride=1, padding=1) | |
| self.conv3 = torch.nn.Conv2d(8, 8, kernel_size=3, stride=1, padding=1) |
This file contains hidden or 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
| void init() { | |
| for (int i = 0; i < N; i++) { | |
| root[i] = std::exp(2 * pi * i / N * imaginary); | |
| rev[i] = (rev[i >> 1] >> 1) + ((i & 1) << (K - 1)); | |
| // std::cout << rev[i] << "\n"; | |
| std::cout << root[i] << "\n"; | |
| } | |
| root[N] = root[0]; | |
| } |
NewerOlder