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
26 de 2e a3 7f 50 3e 0f 2f 32 7f 50 3e 1c 87 32 | |
7f 50 3e 98 2f 32 7f 50 26 df 2e 0a af 50 11 e3 | |
c3 85 7f 50 cd d3 de af 85 50 cd d8 de 1c 2a 50 | |
2b cd d3 de 2a 50 2b cd d8 de 7f 50 cd 7f 7f 7f | |
b3 50 cb 47 c4 c1 de 50 cb 7f c4 c4 de 50 0f 0f | |
0f cb 47 50 c4 c6 de 7f 7f 50 c3 80 de 34 c9 50 | |
2b c9 d1 c9 7f 50 06 c3 7f 7f 7f 50 12 1c c9 0f | |
0f 50 0f 0f 06 0f a0 50 06 0a b8 30 0a 50 c6 48 | |
c6 ae 7f 50 c3 ca de c6 2b 50 c6 2b 47 7f 7f 50 | |
c3 ca de |
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 sympy import * | |
from functools import reduce | |
import operator | |
x, t = symbols('x t') | |
def gosper_form(u_1, u_2): | |
res = resultant(u_1, u_2.subs(x, x + t), x) | |
roots = poly(res, t).all_roots() | |
int_roots = [rt for rt in roots if rt.is_Integer and rt > 0] | |
if int_roots == []: |
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
using System; | |
namespace ConsoleApp1 | |
{ | |
class Interpreter | |
{ | |
ushort af; | |
ushort bc; | |
ushort de; | |
ushort hl; |
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
type variable = string | |
type formula = | |
Equal of variable * variable | |
| Epsilon of variable * variable | |
| Imply of formula * formula | |
| Not of formula | |
| And of formula * formula | |
| Or of formula * formula | |
| Forall of variable * formula |
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 <stdio.h> | |
#include <algorithm> | |
#include "gmp.h" | |
const int M = 3000; | |
mpz_t fact[M+1]; | |
mpz_t binomial[M+1][M+1]; | |
mpz_t b[M+1][M+1]; | |
mpz_t a[M+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
# 次の主張: | |
# π: G→G/Z(G)を標準的な射影とすれば | |
# φ: Syl_p(G)→Syl_p(G/Z(G)); H↦π[H] | |
# がwell-defined 全単射 | |
# を小さい群に対して確かめる | |
list := [ | |
["S3", SymmetricGroup(3)], | |
["D8", DihedralGroup(8)], | |
["Q8", SmallGroup(8,4)], |
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 qualified Data.Vector.Mutable as MV | |
import qualified Data.Vector as V | |
import Control.Monad.Primitive | |
import Control.Monad | |
myswap :: PrimMonad m => MV.MVector (PrimState m) a -> Int -> Int -> m () | |
myswap v i j = do | |
a <- MV.read v i | |
b <- MV.read v j | |
MV.write v i b |
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 Data.Ratio | |
fact :: Integer -> Integer | |
fact 0 = 1 | |
fact n = (fact (n - 1)) * n | |
solve2 :: Integer -> Rational | |
solve2 m = sum $ map (\k -> sum [term r s | r <- [0..m], s <- [0..m], r + s == k && r + 2 * s <= m]) [1..m] | |
where term r s = (-1)^(r+s-1)%(2^s*(fact r)*(fact s))*(product [1-i%m | i <- [0..r+2*s-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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <functional> | |
typedef long long ll; | |
bool has_1_loop(std::vector<int> &v) { |
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 edu.jas.arith import * | |
from edu.jas.poly import * | |
from edu.jas.gbufd import * | |
br = BigInteger(0) | |
vars = ["y", "x"] | |
ring = GenPolynomialRing(br, len(vars), TermOrder(TermOrder.INVLEX), vars) | |
a = ring.parse("x^3 - 3 x^2 - y + 1") | |
b = ring.parse("-x^2 + y^2 - 1") |