diff --git a/010.x b/010.x deleted file mode 100755 index 3ce9062..0000000 Binary files a/010.x and /dev/null differ diff --git a/a.out b/a.out deleted file mode 100755 index ed3b0c1..0000000 Binary files a/a.out and /dev/null differ diff --git a/clean_uncommited b/clean_uncommited deleted file mode 100755 index a255718..0000000 --- a/clean_uncommited +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env zsh - -[[ $1 != "-f" ]] && { print "Use -f option to delete:" } - -for fic in $(git status | tail -n +5| head -n -1 |awk '{print $2}'); do -print '[?]' $fic -[[ $1 = "-f" ]] && \rm $fic -done diff --git a/hs-euler/.gitignore b/hs-euler/.gitignore new file mode 100644 index 0000000..40ec8ac --- /dev/null +++ b/hs-euler/.gitignore @@ -0,0 +1,3 @@ +.stack-work/ +euler072.cabal +*~ \ No newline at end of file diff --git a/hs-euler/ChangeLog.md b/hs-euler/ChangeLog.md new file mode 100644 index 0000000..ef481df --- /dev/null +++ b/hs-euler/ChangeLog.md @@ -0,0 +1,3 @@ +# Changelog for euler072 + +## Unreleased changes diff --git a/hs-euler/LICENSE b/hs-euler/LICENSE new file mode 100644 index 0000000..102126f --- /dev/null +++ b/hs-euler/LICENSE @@ -0,0 +1,30 @@ +Copyright Author name here (c) 2019 + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Author name here nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/hs-euler/README.md b/hs-euler/README.md new file mode 100644 index 0000000..2a5eb1e --- /dev/null +++ b/hs-euler/README.md @@ -0,0 +1 @@ +# euler072 diff --git a/hs-euler/Setup.hs b/hs-euler/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/hs-euler/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/hs-euler/app/Main.hs b/hs-euler/app/Main.hs new file mode 100644 index 0000000..76c81cf --- /dev/null +++ b/hs-euler/app/Main.hs @@ -0,0 +1,61 @@ +#!/usr/bin/env stack +{- stack script + --resolver lts-13.24 + --install-ghc + --package arithmoi +-} + +{- +Consider the fraction, n/d, where n and d are positive integers. If n [Integer] +reducedProper d = do + let pf = map fst $ factorise d + x <- [1..d] + guard (not (any (\p -> x `rem` p == 0) pf)) + return x + +-- Naive solution, took ages +nbFractions :: Integer -> Int +nbFractions d = foldl' (+) 0 (map (traceShowId . length . reducedProper . traceShowId) [2..d]) + +-- Write a list of all factors +factors = concatMap (\(x,n) -> replicate n x) . factorise + +-- phi, Euler's totient function +-- https://en.wikipedia.org/wiki/Euler%27s_totient_function +phi n + | isPrime n = n-1 + | otherwise = prodPhi (factors n) + where + prodPhi [a] = a-1 + prodPhi (a:b:t) + | a == b = a * prodPhi (b:t) + | otherwise = (a - 1) * prodPhi (b:t) + +-- less than 5s +solution n = sum $ map phi [2..n] + +main :: IO () +main = do + let n = 1000000 + -- print $ nbFractions n -- 303963552391 + print $ solution n diff --git a/hs-euler/euler.cabal b/hs-euler/euler.cabal new file mode 100644 index 0000000..18bdab6 --- /dev/null +++ b/hs-euler/euler.cabal @@ -0,0 +1,67 @@ +-- This file has been generated from package.yaml by hpack version 0.28.2. +-- +-- see: https://github.com/sol/hpack +-- +-- hash: 859091034e520db697fc23b2aeb6b27cc63dfe46541d371c8bd861b7ff922014 + +name: euler072 +version: 0.1.0.0 +description: Please see the README on GitHub at +homepage: https://github.com/githubuser/euler072#readme +bug-reports: https://github.com/githubuser/euler072/issues +author: Author name here +maintainer: example@example.com +copyright: 2019 Author name here +license: BSD3 +license-file: LICENSE +build-type: Simple +cabal-version: >= 1.10 +extra-source-files: + ChangeLog.md + README.md + +source-repository head + type: git + location: https://github.com/githubuser/euler072 + +library + exposed-modules: + Lib + other-modules: + Paths_euler072 + hs-source-dirs: + src + build-depends: + arithmoi + , base >=4.7 && <5 + , protolude + default-language: Haskell2010 + +executable euler072-exe + main-is: Main.hs + other-modules: + Paths_euler072 + hs-source-dirs: + app + ghc-options: -O -threaded -rtsopts -with-rtsopts=-N + build-depends: + arithmoi + , base >=4.7 && <5 + , euler072 + , protolude + default-language: Haskell2010 + +test-suite euler072-test + type: exitcode-stdio-1.0 + main-is: Spec.hs + other-modules: + Paths_euler072 + hs-source-dirs: + test + ghc-options: -threaded -rtsopts -with-rtsopts=-N + build-depends: + arithmoi + , base >=4.7 && <5 + , euler072 + , protolude + default-language: Haskell2010 diff --git a/hs-euler/package.yaml b/hs-euler/package.yaml new file mode 100644 index 0000000..751e89d --- /dev/null +++ b/hs-euler/package.yaml @@ -0,0 +1,51 @@ +name: euler072 +version: 0.1.0.0 +github: "githubuser/euler072" +license: BSD3 +author: "Author name here" +maintainer: "example@example.com" +copyright: "2019 Author name here" + +extra-source-files: +- README.md +- ChangeLog.md + +# Metadata used when publishing your package +# synopsis: Short description of your package +# category: Web + +# To avoid duplicated efforts in documentation and dealing with the +# complications of embedding Haddock markup inside cabal files, it is +# common to point users to the README.md file. +description: Please see the README on GitHub at + +dependencies: +- base >= 4.7 && < 5 +- protolude +- arithmoi + +library: + source-dirs: src + +executables: + euler072-exe: + main: Main.hs + source-dirs: app + ghc-options: + - -O + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - euler072 + +tests: + euler072-test: + main: Spec.hs + source-dirs: test + ghc-options: + - -threaded + - -rtsopts + - -with-rtsopts=-N + dependencies: + - euler072 diff --git a/hs-euler/src/Euler072.hs b/hs-euler/src/Euler072.hs new file mode 100644 index 0000000..76c81cf --- /dev/null +++ b/hs-euler/src/Euler072.hs @@ -0,0 +1,61 @@ +#!/usr/bin/env stack +{- stack script + --resolver lts-13.24 + --install-ghc + --package arithmoi +-} + +{- +Consider the fraction, n/d, where n and d are positive integers. If n [Integer] +reducedProper d = do + let pf = map fst $ factorise d + x <- [1..d] + guard (not (any (\p -> x `rem` p == 0) pf)) + return x + +-- Naive solution, took ages +nbFractions :: Integer -> Int +nbFractions d = foldl' (+) 0 (map (traceShowId . length . reducedProper . traceShowId) [2..d]) + +-- Write a list of all factors +factors = concatMap (\(x,n) -> replicate n x) . factorise + +-- phi, Euler's totient function +-- https://en.wikipedia.org/wiki/Euler%27s_totient_function +phi n + | isPrime n = n-1 + | otherwise = prodPhi (factors n) + where + prodPhi [a] = a-1 + prodPhi (a:b:t) + | a == b = a * prodPhi (b:t) + | otherwise = (a - 1) * prodPhi (b:t) + +-- less than 5s +solution n = sum $ map phi [2..n] + +main :: IO () +main = do + let n = 1000000 + -- print $ nbFractions n -- 303963552391 + print $ solution n diff --git a/hs-euler/src/Lib.hs b/hs-euler/src/Lib.hs new file mode 100644 index 0000000..d36ff27 --- /dev/null +++ b/hs-euler/src/Lib.hs @@ -0,0 +1,6 @@ +module Lib + ( someFunc + ) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/hs-euler/stack.yaml b/hs-euler/stack.yaml new file mode 100644 index 0000000..a5574d7 --- /dev/null +++ b/hs-euler/stack.yaml @@ -0,0 +1,65 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# resolver: ghcjs-0.1.0_ghc-7.10.2 +# +# The location of a snapshot can be provided as a file or url. Stack assumes +# a snapshot provided as a file might change, whereas a url resource does not. +# +# resolver: ./custom-snapshot.yaml +# resolver: https://example.com/snapshots/2018-01-01.yaml +resolver: lts-13.25 + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# - location: +# git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# subdirs: +# - auto-update +# - wai +packages: +- . +# Dependency packages to be pulled from upstream that are not in the resolver +# using the same syntax as the packages field. +# (e.g., acme-missiles-0.3) +# extra-deps: [] + +# Override default flag values for local packages and extra-deps +# flags: {} + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=1.7" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor \ No newline at end of file diff --git a/hs-euler/test/Spec.hs b/hs-euler/test/Spec.hs new file mode 100644 index 0000000..cd4753f --- /dev/null +++ b/hs-euler/test/Spec.hs @@ -0,0 +1,2 @@ +main :: IO () +main = putStrLn "Test suite not yet implemented" diff --git a/010-bis.c b/old-c/010-bis.c similarity index 100% rename from 010-bis.c rename to old-c/010-bis.c diff --git a/010.c b/old-c/010.c similarity index 100% rename from 010.c rename to old-c/010.c diff --git a/014.c b/old-c/014.c similarity index 100% rename from 014.c rename to old-c/014.c diff --git a/059-bis.c b/old-c/059-bis.c similarity index 100% rename from 059-bis.c rename to old-c/059-bis.c diff --git a/059.c b/old-c/059.c similarity index 100% rename from 059.c rename to old-c/059.c diff --git a/array.h b/old-c/array.h similarity index 100% rename from array.h rename to old-c/array.h diff --git a/dictionnary.c b/old-c/dictionnary.c similarity index 100% rename from dictionnary.c rename to old-c/dictionnary.c diff --git a/014-scanned.hs b/old-haskell/014-scanned.hs similarity index 100% rename from 014-scanned.hs rename to old-haskell/014-scanned.hs diff --git a/014.hs b/old-haskell/014.hs similarity index 100% rename from 014.hs rename to old-haskell/014.hs diff --git a/014c.hs b/old-haskell/014c.hs similarity index 100% rename from 014c.hs rename to old-haskell/014c.hs diff --git a/054.hs b/old-haskell/054.hs similarity index 100% rename from 054.hs rename to old-haskell/054.hs diff --git a/055.hs b/old-haskell/055.hs similarity index 100% rename from 055.hs rename to old-haskell/055.hs diff --git a/056.hs b/old-haskell/056.hs similarity index 100% rename from 056.hs rename to old-haskell/056.hs diff --git a/057.hs b/old-haskell/057.hs similarity index 100% rename from 057.hs rename to old-haskell/057.hs diff --git a/058.hs b/old-haskell/058.hs similarity index 100% rename from 058.hs rename to old-haskell/058.hs diff --git a/059.hs b/old-haskell/059.hs similarity index 100% rename from 059.hs rename to old-haskell/059.hs diff --git a/060-cheat.hs b/old-haskell/060-cheat.hs similarity index 100% rename from 060-cheat.hs rename to old-haskell/060-cheat.hs diff --git a/060-old.hs b/old-haskell/060-old.hs similarity index 100% rename from 060-old.hs rename to old-haskell/060-old.hs diff --git a/060.hs b/old-haskell/060.hs similarity index 100% rename from 060.hs rename to old-haskell/060.hs diff --git a/061.hs b/old-haskell/061.hs similarity index 100% rename from 061.hs rename to old-haskell/061.hs diff --git a/063.hs b/old-haskell/063.hs similarity index 100% rename from 063.hs rename to old-haskell/063.hs diff --git a/064.hs b/old-haskell/064.hs similarity index 100% rename from 064.hs rename to old-haskell/064.hs diff --git a/065.hs b/old-haskell/065.hs similarity index 100% rename from 065.hs rename to old-haskell/065.hs diff --git a/066.hs b/old-haskell/066.hs similarity index 100% rename from 066.hs rename to old-haskell/066.hs diff --git a/068.hs b/old-haskell/068.hs similarity index 100% rename from 068.hs rename to old-haskell/068.hs diff --git a/069.lhs b/old-haskell/069.lhs similarity index 100% rename from 069.lhs rename to old-haskell/069.lhs diff --git a/070.lhs b/old-haskell/070.lhs similarity index 100% rename from 070.lhs rename to old-haskell/070.lhs diff --git a/old-haskell/072.hs b/old-haskell/072.hs new file mode 100755 index 0000000..cb66799 --- /dev/null +++ b/old-haskell/072.hs @@ -0,0 +1,35 @@ +#!/usr/bin/env stack +{- stack script + --resolver lts-13.24 + --install-ghc + --package arithmoi +-} + +{- +Consider the fraction, n/d, where n and d are positive integers. If n [Int] +reducedProper d = do + let pf = map fst $ factorise d + x <- [1..d] + guard (some (\p -> x `rem` p == 0) pf) + return x + +main :: IO () +main = do + print $ reducedProper 8 diff --git a/Prime.hs b/old-haskell/Prime.hs similarity index 100% rename from Prime.hs rename to old-haskell/Prime.hs diff --git a/combination.hs b/old-haskell/combination.hs similarity index 100% rename from combination.hs rename to old-haskell/combination.hs diff --git a/059.pl b/old-perl/059.pl similarity index 100% rename from 059.pl rename to old-perl/059.pl diff --git a/002.rb b/old-ruby/002.rb similarity index 100% rename from 002.rb rename to old-ruby/002.rb diff --git a/003.rb b/old-ruby/003.rb similarity index 100% rename from 003.rb rename to old-ruby/003.rb diff --git a/004.rb b/old-ruby/004.rb similarity index 100% rename from 004.rb rename to old-ruby/004.rb diff --git a/005.rb b/old-ruby/005.rb similarity index 100% rename from 005.rb rename to old-ruby/005.rb diff --git a/006.rb b/old-ruby/006.rb similarity index 100% rename from 006.rb rename to old-ruby/006.rb diff --git a/007.rb b/old-ruby/007.rb similarity index 100% rename from 007.rb rename to old-ruby/007.rb diff --git a/008.rb b/old-ruby/008.rb similarity index 100% rename from 008.rb rename to old-ruby/008.rb diff --git a/009.rb b/old-ruby/009.rb similarity index 100% rename from 009.rb rename to old-ruby/009.rb diff --git a/010-bis.rb b/old-ruby/010-bis.rb similarity index 100% rename from 010-bis.rb rename to old-ruby/010-bis.rb diff --git a/010.rb b/old-ruby/010.rb similarity index 100% rename from 010.rb rename to old-ruby/010.rb diff --git a/011.rb b/old-ruby/011.rb similarity index 100% rename from 011.rb rename to old-ruby/011.rb diff --git a/012.rb b/old-ruby/012.rb similarity index 100% rename from 012.rb rename to old-ruby/012.rb diff --git a/013.rb b/old-ruby/013.rb similarity index 100% rename from 013.rb rename to old-ruby/013.rb diff --git a/014.rb b/old-ruby/014.rb similarity index 100% rename from 014.rb rename to old-ruby/014.rb diff --git a/015.rb b/old-ruby/015.rb similarity index 100% rename from 015.rb rename to old-ruby/015.rb diff --git a/017.rb b/old-ruby/017.rb similarity index 100% rename from 017.rb rename to old-ruby/017.rb diff --git a/018.rb b/old-ruby/018.rb similarity index 100% rename from 018.rb rename to old-ruby/018.rb diff --git a/019.rb b/old-ruby/019.rb similarity index 100% rename from 019.rb rename to old-ruby/019.rb diff --git a/020.rb b/old-ruby/020.rb similarity index 100% rename from 020.rb rename to old-ruby/020.rb diff --git a/021.rb b/old-ruby/021.rb similarity index 100% rename from 021.rb rename to old-ruby/021.rb diff --git a/022.rb b/old-ruby/022.rb similarity index 100% rename from 022.rb rename to old-ruby/022.rb diff --git a/023.rb b/old-ruby/023.rb similarity index 100% rename from 023.rb rename to old-ruby/023.rb diff --git a/024.rb b/old-ruby/024.rb similarity index 100% rename from 024.rb rename to old-ruby/024.rb diff --git a/025.rb b/old-ruby/025.rb similarity index 100% rename from 025.rb rename to old-ruby/025.rb diff --git a/026.rb b/old-ruby/026.rb similarity index 100% rename from 026.rb rename to old-ruby/026.rb diff --git a/027.rb b/old-ruby/027.rb similarity index 100% rename from 027.rb rename to old-ruby/027.rb diff --git a/028.rb b/old-ruby/028.rb similarity index 100% rename from 028.rb rename to old-ruby/028.rb diff --git a/029.rb b/old-ruby/029.rb similarity index 100% rename from 029.rb rename to old-ruby/029.rb diff --git a/030.rb b/old-ruby/030.rb similarity index 100% rename from 030.rb rename to old-ruby/030.rb diff --git a/031.rb b/old-ruby/031.rb similarity index 100% rename from 031.rb rename to old-ruby/031.rb diff --git a/032.rb b/old-ruby/032.rb similarity index 100% rename from 032.rb rename to old-ruby/032.rb diff --git a/033.rb b/old-ruby/033.rb similarity index 100% rename from 033.rb rename to old-ruby/033.rb diff --git a/034.rb b/old-ruby/034.rb similarity index 100% rename from 034.rb rename to old-ruby/034.rb diff --git a/035.rb b/old-ruby/035.rb similarity index 100% rename from 035.rb rename to old-ruby/035.rb diff --git a/036.rb b/old-ruby/036.rb similarity index 100% rename from 036.rb rename to old-ruby/036.rb diff --git a/037.rb b/old-ruby/037.rb similarity index 100% rename from 037.rb rename to old-ruby/037.rb diff --git a/038.rb b/old-ruby/038.rb similarity index 100% rename from 038.rb rename to old-ruby/038.rb diff --git a/039.rb b/old-ruby/039.rb similarity index 100% rename from 039.rb rename to old-ruby/039.rb diff --git a/040.rb b/old-ruby/040.rb similarity index 100% rename from 040.rb rename to old-ruby/040.rb diff --git a/041.rb b/old-ruby/041.rb similarity index 100% rename from 041.rb rename to old-ruby/041.rb diff --git a/042.rb b/old-ruby/042.rb similarity index 100% rename from 042.rb rename to old-ruby/042.rb diff --git a/043.rb b/old-ruby/043.rb similarity index 100% rename from 043.rb rename to old-ruby/043.rb diff --git a/044.rb b/old-ruby/044.rb similarity index 100% rename from 044.rb rename to old-ruby/044.rb diff --git a/045.rb b/old-ruby/045.rb similarity index 100% rename from 045.rb rename to old-ruby/045.rb diff --git a/046.rb b/old-ruby/046.rb similarity index 100% rename from 046.rb rename to old-ruby/046.rb diff --git a/047.rb b/old-ruby/047.rb similarity index 100% rename from 047.rb rename to old-ruby/047.rb diff --git a/048.rb b/old-ruby/048.rb similarity index 100% rename from 048.rb rename to old-ruby/048.rb diff --git a/049.rb b/old-ruby/049.rb similarity index 100% rename from 049.rb rename to old-ruby/049.rb diff --git a/050.rb b/old-ruby/050.rb similarity index 100% rename from 050.rb rename to old-ruby/050.rb diff --git a/051.rb b/old-ruby/051.rb similarity index 100% rename from 051.rb rename to old-ruby/051.rb diff --git a/052.rb b/old-ruby/052.rb similarity index 100% rename from 052.rb rename to old-ruby/052.rb diff --git a/053.rb b/old-ruby/053.rb similarity index 100% rename from 053.rb rename to old-ruby/053.rb diff --git a/054.rb b/old-ruby/054.rb similarity index 100% rename from 054.rb rename to old-ruby/054.rb diff --git a/058.rb b/old-ruby/058.rb similarity index 100% rename from 058.rb rename to old-ruby/058.rb diff --git a/059.rb b/old-ruby/059.rb similarity index 100% rename from 059.rb rename to old-ruby/059.rb diff --git a/060.rb b/old-ruby/060.rb similarity index 100% rename from 060.rb rename to old-ruby/060.rb diff --git a/062.rb b/old-ruby/062.rb similarity index 100% rename from 062.rb rename to old-ruby/062.rb diff --git a/generate_primes.rb b/old-ruby/generate_primes.rb similarity index 100% rename from generate_primes.rb rename to old-ruby/generate_primes.rb diff --git a/primes.rb b/old-ruby/primes.rb similarity index 100% rename from primes.rb rename to old-ruby/primes.rb diff --git a/cipher1-line.txt b/resources/cipher1-line.txt similarity index 100% rename from cipher1-line.txt rename to resources/cipher1-line.txt diff --git a/cipher1.enc b/resources/cipher1.enc similarity index 100% rename from cipher1.enc rename to resources/cipher1.enc diff --git a/cipher1.txt b/resources/cipher1.txt similarity index 100% rename from cipher1.txt rename to resources/cipher1.txt diff --git a/names.txt b/resources/names.txt similarity index 100% rename from names.txt rename to resources/names.txt diff --git a/poker.txt b/resources/poker.txt similarity index 100% rename from poker.txt rename to resources/poker.txt diff --git a/poker.txt.old b/resources/poker.txt.old similarity index 100% rename from poker.txt.old rename to resources/poker.txt.old diff --git a/true.poker.txt b/resources/true.poker.txt similarity index 100% rename from true.poker.txt rename to resources/true.poker.txt diff --git a/tst.poker.txt b/resources/tst.poker.txt similarity index 100% rename from tst.poker.txt rename to resources/tst.poker.txt diff --git a/words-line.test b/resources/words-line.test similarity index 100% rename from words-line.test rename to resources/words-line.test diff --git a/words-line.txt b/resources/words-line.txt similarity index 100% rename from words-line.txt rename to resources/words-line.txt diff --git a/words.txt b/resources/words.txt similarity index 100% rename from words.txt rename to resources/words.txt diff --git a/trace b/trace deleted file mode 100644 index 3f6dd6b..0000000 --- a/trace +++ /dev/null @@ -1,676 +0,0 @@ -[[2, 3, 5, 7, 11, 13], ["1", "0", "2"], ""] -exists: 910 -[[2, 3, 5, 7, 11], ["9", "1", "0"], "2"] -exists: 891 -[[2, 3, 5, 7], ["8", "9", "1"], "02"] -exists: 189 -[[2, 3, 5], ["1", "8", "9"], "102"] -[[2, 3, 5, 7, 11, 13], ["1", "3", "6"], ""] -[[2, 3, 5, 7, 11, 13], ["1", "5", "3"], ""] -exists: 715 -[[2, 3, 5, 7, 11], ["7", "1", "5"], "3"] -exists: 671 -[[2, 3, 5, 7], ["6", "7", "1"], "53"] -exists: 567 -[[2, 3, 5], ["5", "6", "7"], "153"] -[[2, 3, 5, 7, 11, 13], ["1", "7", "0"], ""] -[[2, 3, 5, 7, 11, 13], ["1", "8", "7"], ""] -[[2, 3, 5, 7, 11, 13], ["2", "0", "4"], ""] -exists: 520 -[[2, 3, 5, 7, 11], ["5", "2", "0"], "4"] -exists: 352 -[[2, 3, 5, 7], ["3", "5", "2"], "04"] -exists: 735 -[[2, 3, 5], ["7", "3", "5"], "204"] -[[2, 3, 5, 7, 11, 13], ["2", "3", "8"], ""] -exists: 923 -[[2, 3, 5, 7, 11], ["9", "2", "3"], "8"] -exists: 792 -[[2, 3, 5, 7], ["7", "9", "2"], "38"] -exists: 679 -[[2, 3, 5], ["6", "7", "9"], "238"] -[[2, 3, 5, 7, 11, 13], ["2", "8", "9"], ""] -exists: 728 -[[2, 3, 5, 7, 11], ["7", "2", "8"], "9"] -exists: 572 -[[2, 3, 5, 7], ["5", "7", "2"], "89"] -exists: 357 -[[2, 3, 5], ["3", "5", "7"], "289"] -exists: 135 -[[2, 3], ["1", "3", "5"], "7289"] -exists: 213 -[[2], ["2", "1", "3"], "57289"] -exists: 513 -[[2], ["5", "1", "3"], "57289"] -exists: 813 -[[2], ["8", "1", "3"], "57289"] -exists: 235 -[[2, 3], ["2", "3", "5"], "7289"] -exists: 123 -[[2], ["1", "2", "3"], "57289"] -exists: 312 -[[], ["3", "1", "2"], "357289"] -* 312357289 -exists: 412 -[[], ["4", "1", "2"], "357289"] -* 412357289 -exists: 512 -[[], ["5", "1", "2"], "357289"] -* 512357289 -exists: 612 -[[], ["6", "1", "2"], "357289"] -* 612357289 -exists: 712 -[[], ["7", "1", "2"], "357289"] -* 712357289 -exists: 812 -[[], ["8", "1", "2"], "357289"] -* 812357289 -exists: 912 -[[], ["9", "1", "2"], "357289"] -* 912357289 -exists: 423 -[[2], ["4", "2", "3"], "57289"] -exists: 142 -[[], ["1", "4", "2"], "357289"] -* 142357289 -exists: 342 -[[], ["3", "4", "2"], "357289"] -* 342357289 -exists: 542 -[[], ["5", "4", "2"], "357289"] -* 542357289 -exists: 642 -[[], ["6", "4", "2"], "357289"] -* 642357289 -exists: 742 -[[], ["7", "4", "2"], "357289"] -* 742357289 -exists: 842 -[[], ["8", "4", "2"], "357289"] -* 842357289 -exists: 942 -[[], ["9", "4", "2"], "357289"] -* 942357289 -exists: 723 -[[2], ["7", "2", "3"], "57289"] -exists: 172 -[[], ["1", "7", "2"], "357289"] -* 172357289 -exists: 372 -[[], ["3", "7", "2"], "357289"] -* 372357289 -exists: 472 -[[], ["4", "7", "2"], "357289"] -* 472357289 -exists: 572 -[[], ["5", "7", "2"], "357289"] -* 572357289 -exists: 672 -[[], ["6", "7", "2"], "357289"] -* 672357289 -exists: 872 -[[], ["8", "7", "2"], "357289"] -* 872357289 -exists: 972 -[[], ["9", "7", "2"], "357289"] -* 972357289 -exists: 435 -[[2, 3], ["4", "3", "5"], "7289"] -exists: 243 -[[2], ["2", "4", "3"], "57289"] -exists: 124 -[[], ["1", "2", "4"], "357289"] -* 124357289 -exists: 324 -[[], ["3", "2", "4"], "357289"] -* 324357289 -exists: 524 -[[], ["5", "2", "4"], "357289"] -* 524357289 -exists: 624 -[[], ["6", "2", "4"], "357289"] -* 624357289 -exists: 724 -[[], ["7", "2", "4"], "357289"] -* 724357289 -exists: 824 -[[], ["8", "2", "4"], "357289"] -* 824357289 -exists: 924 -[[], ["9", "2", "4"], "357289"] -* 924357289 -exists: 543 -[[2], ["5", "4", "3"], "57289"] -exists: 154 -[[], ["1", "5", "4"], "357289"] -* 154357289 -exists: 254 -[[], ["2", "5", "4"], "357289"] -* 254357289 -exists: 354 -[[], ["3", "5", "4"], "357289"] -* 354357289 -exists: 654 -[[], ["6", "5", "4"], "357289"] -* 654357289 -exists: 754 -[[], ["7", "5", "4"], "357289"] -* 754357289 -exists: 854 -[[], ["8", "5", "4"], "357289"] -* 854357289 -exists: 954 -[[], ["9", "5", "4"], "357289"] -* 954357289 -exists: 843 -[[2], ["8", "4", "3"], "57289"] -exists: 184 -[[], ["1", "8", "4"], "357289"] -* 184357289 -exists: 284 -[[], ["2", "8", "4"], "357289"] -* 284357289 -exists: 384 -[[], ["3", "8", "4"], "357289"] -* 384357289 -exists: 584 -[[], ["5", "8", "4"], "357289"] -* 584357289 -exists: 684 -[[], ["6", "8", "4"], "357289"] -* 684357289 -exists: 784 -[[], ["7", "8", "4"], "357289"] -* 784357289 -exists: 984 -[[], ["9", "8", "4"], "357289"] -* 984357289 -exists: 635 -[[2, 3], ["6", "3", "5"], "7289"] -exists: 963 -[[2], ["9", "6", "3"], "57289"] -exists: 196 -[[], ["1", "9", "6"], "357289"] -* 196357289 -exists: 296 -[[], ["2", "9", "6"], "357289"] -* 296357289 -exists: 396 -[[], ["3", "9", "6"], "357289"] -* 396357289 -exists: 496 -[[], ["4", "9", "6"], "357289"] -* 496357289 -exists: 596 -[[], ["5", "9", "6"], "357289"] -* 596357289 -exists: 796 -[[], ["7", "9", "6"], "357289"] -* 796357289 -exists: 896 -[[], ["8", "9", "6"], "357289"] -* 896357289 -exists: 735 -[[2, 3], ["7", "3", "5"], "7289"] -exists: 273 -[[2], ["2", "7", "3"], "57289"] -exists: 573 -[[2], ["5", "7", "3"], "57289"] -exists: 873 -[[2], ["8", "7", "3"], "57289"] -exists: 835 -[[2, 3], ["8", "3", "5"], "7289"] -exists: 183 -[[2], ["1", "8", "3"], "57289"] -exists: 218 -[[], ["2", "1", "8"], "357289"] -* 218357289 -exists: 318 -[[], ["3", "1", "8"], "357289"] -* 318357289 -exists: 418 -[[], ["4", "1", "8"], "357289"] -* 418357289 -exists: 518 -[[], ["5", "1", "8"], "357289"] -* 518357289 -exists: 618 -[[], ["6", "1", "8"], "357289"] -* 618357289 -exists: 718 -[[], ["7", "1", "8"], "357289"] -* 718357289 -exists: 918 -[[], ["9", "1", "8"], "357289"] -* 918357289 -exists: 483 -[[2], ["4", "8", "3"], "57289"] -exists: 148 -[[], ["1", "4", "8"], "357289"] -* 148357289 -exists: 248 -[[], ["2", "4", "8"], "357289"] -* 248357289 -exists: 348 -[[], ["3", "4", "8"], "357289"] -* 348357289 -exists: 548 -[[], ["5", "4", "8"], "357289"] -* 548357289 -exists: 648 -[[], ["6", "4", "8"], "357289"] -* 648357289 -exists: 748 -[[], ["7", "4", "8"], "357289"] -* 748357289 -exists: 948 -[[], ["9", "4", "8"], "357289"] -* 948357289 -exists: 783 -[[2], ["7", "8", "3"], "57289"] -exists: 178 -[[], ["1", "7", "8"], "357289"] -* 178357289 -exists: 278 -[[], ["2", "7", "8"], "357289"] -* 278357289 -exists: 378 -[[], ["3", "7", "8"], "357289"] -* 378357289 -exists: 478 -[[], ["4", "7", "8"], "357289"] -* 478357289 -exists: 578 -[[], ["5", "7", "8"], "357289"] -* 578357289 -exists: 678 -[[], ["6", "7", "8"], "357289"] -* 678357289 -exists: 978 -[[], ["9", "7", "8"], "357289"] -* 978357289 -exists: 935 -[[2, 3], ["9", "3", "5"], "7289"] -exists: 693 -[[2], ["6", "9", "3"], "57289"] -[[2, 3, 5, 7, 11, 13], ["3", "0", "6"], ""] -exists: 130 -[[2, 3, 5, 7, 11], ["1", "3", "0"], "6"] -exists: 913 -[[2, 3, 5, 7], ["9", "1", "3"], "06"] -exists: 791 -[[2, 3, 5], ["7", "9", "1"], "306"] -[[2, 3, 5, 7, 11, 13], ["3", "4", "0"], ""] -exists: 234 -[[2, 3, 5, 7, 11], ["2", "3", "4"], "0"] -[[2, 3, 5, 7, 11, 13], ["3", "5", "7"], ""] -[[2, 3, 5, 7, 11, 13], ["3", "7", "4"], ""] -exists: 637 -[[2, 3, 5, 7, 11], ["6", "3", "7"], "4"] -[[2, 3, 5, 7, 11, 13], ["3", "9", "1"], ""] -[[2, 3, 5, 7, 11, 13], ["4", "0", "8"], ""] -[[2, 3, 5, 7, 11, 13], ["4", "2", "5"], ""] -[[2, 3, 5, 7, 11, 13], ["4", "5", "9"], ""] -exists: 845 -[[2, 3, 5, 7, 11], ["8", "4", "5"], "9"] -[[2, 3, 5, 7, 11, 13], ["4", "7", "6"], ""] -exists: 247 -[[2, 3, 5, 7, 11], ["2", "4", "7"], "6"] -exists: 924 -[[2, 3, 5, 7], ["9", "2", "4"], "76"] -exists: 392 -[[2, 3, 5], ["3", "9", "2"], "476"] -[[2, 3, 5, 7, 11, 13], ["4", "9", "3"], ""] -[[2, 3, 5, 7, 11, 13], ["5", "1", "0"], ""] -exists: 351 -[[2, 3, 5, 7, 11], ["3", "5", "1"], "0"] -exists: 935 -[[2, 3, 5, 7], ["9", "3", "5"], "10"] -exists: 693 -[[2, 3, 5], ["6", "9", "3"], "510"] -[[2, 3, 5, 7, 11, 13], ["5", "2", "7"], ""] -[[2, 3, 5, 7, 11, 13], ["5", "6", "1"], ""] -exists: 156 -[[2, 3, 5, 7, 11], ["1", "5", "6"], "1"] -exists: 715 -[[2, 3, 5, 7], ["7", "1", "5"], "61"] -exists: 371 -[[2, 3, 5], ["3", "7", "1"], "561"] -[[2, 3, 5, 7, 11, 13], ["5", "7", "8"], ""] -[[2, 3, 5, 7, 11, 13], ["6", "1", "2"], ""] -[[2, 3, 5, 7, 11, 13], ["6", "2", "9"], ""] -exists: 962 -[[2, 3, 5, 7, 11], ["9", "6", "2"], "9"] -exists: 396 -[[2, 3, 5, 7], ["3", "9", "6"], "29"] -exists: 539 -[[2, 3, 5], ["5", "3", "9"], "629"] -[[2, 3, 5, 7, 11, 13], ["6", "8", "0"], ""] -exists: 468 -[[2, 3, 5, 7, 11], ["4", "6", "8"], "0"] -exists: 946 -[[2, 3, 5, 7], ["9", "4", "6"], "80"] -exists: 294 -[[2, 3, 5], ["2", "9", "4"], "680"] -[[2, 3, 5, 7, 11, 13], ["6", "9", "7"], ""] -exists: 169 -[[2, 3, 5, 7, 11], ["1", "6", "9"], "7"] -[[2, 3, 5, 7, 11, 13], ["7", "1", "4"], ""] -exists: 871 -[[2, 3, 5, 7, 11], ["8", "7", "1"], "4"] -exists: 187 -[[2, 3, 5, 7], ["1", "8", "7"], "14"] -exists: 518 -[[2, 3, 5], ["5", "1", "8"], "714"] -[[2, 3, 5, 7, 11, 13], ["7", "3", "1"], ""] -exists: 273 -[[2, 3, 5, 7, 11], ["2", "7", "3"], "1"] -exists: 627 -[[2, 3, 5, 7], ["6", "2", "7"], "31"] -exists: 462 -[[2, 3, 5], ["4", "6", "2"], "731"] -[[2, 3, 5, 7, 11, 13], ["7", "4", "8"], ""] -[[2, 3, 5, 7, 11, 13], ["7", "6", "5"], ""] -[[2, 3, 5, 7, 11, 13], ["7", "8", "2"], ""] -[[2, 3, 5, 7, 11, 13], ["8", "1", "6"], ""] -exists: 481 -[[2, 3, 5, 7, 11], ["4", "8", "1"], "6"] -exists: 748 -[[2, 3, 5, 7], ["7", "4", "8"], "16"] -exists: 574 -[[2, 3, 5], ["5", "7", "4"], "816"] -[[2, 3, 5, 7, 11, 13], ["8", "5", "0"], ""] -[[2, 3, 5, 7, 11, 13], ["8", "6", "7"], ""] -exists: 286 -[[2, 3, 5, 7, 11], ["2", "8", "6"], "7"] -exists: 528 -[[2, 3, 5, 7], ["5", "2", "8"], "67"] -exists: 952 -[[2, 3, 5], ["9", "5", "2"], "867"] -exists: 195 -[[2, 3], ["1", "9", "5"], "2867"] -exists: 219 -[[2], ["2", "1", "9"], "52867"] -exists: 519 -[[2], ["5", "1", "9"], "52867"] -exists: 819 -[[2], ["8", "1", "9"], "52867"] -exists: 295 -[[2, 3], ["2", "9", "5"], "2867"] -exists: 129 -[[2], ["1", "2", "9"], "52867"] -exists: 312 -[[], ["3", "1", "2"], "952867"] -* 312952867 -exists: 412 -[[], ["4", "1", "2"], "952867"] -* 412952867 -exists: 512 -[[], ["5", "1", "2"], "952867"] -* 512952867 -exists: 612 -[[], ["6", "1", "2"], "952867"] -* 612952867 -exists: 712 -[[], ["7", "1", "2"], "952867"] -* 712952867 -exists: 812 -[[], ["8", "1", "2"], "952867"] -* 812952867 -exists: 912 -[[], ["9", "1", "2"], "952867"] -* 912952867 -exists: 429 -[[2], ["4", "2", "9"], "52867"] -exists: 142 -[[], ["1", "4", "2"], "952867"] -* 142952867 -exists: 342 -[[], ["3", "4", "2"], "952867"] -* 342952867 -exists: 542 -[[], ["5", "4", "2"], "952867"] -* 542952867 -exists: 642 -[[], ["6", "4", "2"], "952867"] -* 642952867 -exists: 742 -[[], ["7", "4", "2"], "952867"] -* 742952867 -exists: 842 -[[], ["8", "4", "2"], "952867"] -* 842952867 -exists: 942 -[[], ["9", "4", "2"], "952867"] -* 942952867 -exists: 729 -[[2], ["7", "2", "9"], "52867"] -exists: 172 -[[], ["1", "7", "2"], "952867"] -* 172952867 -exists: 372 -[[], ["3", "7", "2"], "952867"] -* 372952867 -exists: 472 -[[], ["4", "7", "2"], "952867"] -* 472952867 -exists: 572 -[[], ["5", "7", "2"], "952867"] -* 572952867 -exists: 672 -[[], ["6", "7", "2"], "952867"] -* 672952867 -exists: 872 -[[], ["8", "7", "2"], "952867"] -* 872952867 -exists: 972 -[[], ["9", "7", "2"], "952867"] -* 972952867 -exists: 395 -[[2, 3], ["3", "9", "5"], "2867"] -exists: 639 -[[2], ["6", "3", "9"], "52867"] -exists: 495 -[[2, 3], ["4", "9", "5"], "2867"] -exists: 249 -[[2], ["2", "4", "9"], "52867"] -exists: 124 -[[], ["1", "2", "4"], "952867"] -* 124952867 -exists: 324 -[[], ["3", "2", "4"], "952867"] -* 324952867 -exists: 524 -[[], ["5", "2", "4"], "952867"] -* 524952867 -exists: 624 -[[], ["6", "2", "4"], "952867"] -* 624952867 -exists: 724 -[[], ["7", "2", "4"], "952867"] -* 724952867 -exists: 824 -[[], ["8", "2", "4"], "952867"] -* 824952867 -exists: 924 -[[], ["9", "2", "4"], "952867"] -* 924952867 -exists: 549 -[[2], ["5", "4", "9"], "52867"] -exists: 154 -[[], ["1", "5", "4"], "952867"] -* 154952867 -exists: 254 -[[], ["2", "5", "4"], "952867"] -* 254952867 -exists: 354 -[[], ["3", "5", "4"], "952867"] -* 354952867 -exists: 654 -[[], ["6", "5", "4"], "952867"] -* 654952867 -exists: 754 -[[], ["7", "5", "4"], "952867"] -* 754952867 -exists: 854 -[[], ["8", "5", "4"], "952867"] -* 854952867 -exists: 954 -[[], ["9", "5", "4"], "952867"] -* 954952867 -exists: 849 -[[2], ["8", "4", "9"], "52867"] -exists: 184 -[[], ["1", "8", "4"], "952867"] -* 184952867 -exists: 284 -[[], ["2", "8", "4"], "952867"] -* 284952867 -exists: 384 -[[], ["3", "8", "4"], "952867"] -* 384952867 -exists: 584 -[[], ["5", "8", "4"], "952867"] -* 584952867 -exists: 684 -[[], ["6", "8", "4"], "952867"] -* 684952867 -exists: 784 -[[], ["7", "8", "4"], "952867"] -* 784952867 -exists: 984 -[[], ["9", "8", "4"], "952867"] -* 984952867 -exists: 695 -[[2, 3], ["6", "9", "5"], "2867"] -exists: 369 -[[2], ["3", "6", "9"], "52867"] -exists: 136 -[[], ["1", "3", "6"], "952867"] -* 136952867 -exists: 236 -[[], ["2", "3", "6"], "952867"] -* 236952867 -exists: 436 -[[], ["4", "3", "6"], "952867"] -* 436952867 -exists: 536 -[[], ["5", "3", "6"], "952867"] -* 536952867 -exists: 736 -[[], ["7", "3", "6"], "952867"] -* 736952867 -exists: 836 -[[], ["8", "3", "6"], "952867"] -* 836952867 -exists: 936 -[[], ["9", "3", "6"], "952867"] -* 936952867 -exists: 795 -[[2, 3], ["7", "9", "5"], "2867"] -exists: 279 -[[2], ["2", "7", "9"], "52867"] -exists: 579 -[[2], ["5", "7", "9"], "52867"] -exists: 879 -[[2], ["8", "7", "9"], "52867"] -exists: 895 -[[2, 3], ["8", "9", "5"], "2867"] -exists: 189 -[[2], ["1", "8", "9"], "52867"] -exists: 218 -[[], ["2", "1", "8"], "952867"] -* 218952867 -exists: 318 -[[], ["3", "1", "8"], "952867"] -* 318952867 -exists: 418 -[[], ["4", "1", "8"], "952867"] -* 418952867 -exists: 518 -[[], ["5", "1", "8"], "952867"] -* 518952867 -exists: 618 -[[], ["6", "1", "8"], "952867"] -* 618952867 -exists: 718 -[[], ["7", "1", "8"], "952867"] -* 718952867 -exists: 918 -[[], ["9", "1", "8"], "952867"] -* 918952867 -exists: 489 -[[2], ["4", "8", "9"], "52867"] -exists: 148 -[[], ["1", "4", "8"], "952867"] -* 148952867 -exists: 248 -[[], ["2", "4", "8"], "952867"] -* 248952867 -exists: 348 -[[], ["3", "4", "8"], "952867"] -* 348952867 -exists: 548 -[[], ["5", "4", "8"], "952867"] -* 548952867 -exists: 648 -[[], ["6", "4", "8"], "952867"] -* 648952867 -exists: 748 -[[], ["7", "4", "8"], "952867"] -* 748952867 -exists: 948 -[[], ["9", "4", "8"], "952867"] -* 948952867 -exists: 789 -[[2], ["7", "8", "9"], "52867"] -exists: 178 -[[], ["1", "7", "8"], "952867"] -* 178952867 -exists: 278 -[[], ["2", "7", "8"], "952867"] -* 278952867 -exists: 378 -[[], ["3", "7", "8"], "952867"] -* 378952867 -exists: 478 -[[], ["4", "7", "8"], "952867"] -* 478952867 -exists: 578 -[[], ["5", "7", "8"], "952867"] -* 578952867 -exists: 678 -[[], ["6", "7", "8"], "952867"] -* 678952867 -exists: 978 -[[], ["9", "7", "8"], "952867"] -* 978952867 -[[2, 3, 5, 7, 11, 13], ["9", "0", "1"], ""] -exists: 390 -[[2, 3, 5, 7, 11], ["3", "9", "0"], "1"] -exists: 539 -[[2, 3, 5, 7], ["5", "3", "9"], "01"] -[[2, 3, 5, 7, 11, 13], ["9", "1", "8"], ""] -[[2, 3, 5, 7, 11, 13], ["9", "3", "5"], ""] -exists: 793 -[[2, 3, 5, 7, 11], ["7", "9", "3"], "5"] -[[2, 3, 5, 7, 11, 13], ["9", "5", "2"], ""] -exists: 195 -[[2, 3, 5, 7, 11], ["1", "9", "5"], "2"] -exists: 319 -[[2, 3, 5, 7], ["3", "1", "9"], "52"] -exists: 231 -[[2, 3, 5], ["2", "3", "1"], "952"] -exists: 931 -[[2, 3, 5], ["9", "3", "1"], "952"] -[[2, 3, 5, 7, 11, 13], ["9", "8", "6"], ""] -exists: 598 -[[2, 3, 5, 7, 11], ["5", "9", "8"], "6"] -exists: 759 -[[2, 3, 5, 7], ["7", "5", "9"], "86"] -exists: 175 -[[2, 3, 5], ["1", "7", "5"], "986"] -exists: 875 -[[2, 3, 5], ["8", "7", "5"], "986"] -Sum: 0