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
package Regi; | |
use strict; | |
use warnings; | |
use Exporter qw(import); | |
our @EXPORT = qw(solve); | |
sub search_regi (@) { (sort { $a->length <=> $b->length } @_)[0] } | |
sub solve ($) { |
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
use strict; | |
use warnings; | |
use File::Stamped; | |
my $f = "/tmp/bukkowase.txt"; | |
{ open my $fh, '>', $f } | |
my @pids; | |
for (1 .. 50) { | |
if (my $pid = fork) { |
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
package Hd; | |
use strict; | |
use warnings; | |
use Exporter qw(import); | |
use List::MoreUtils qw(any); | |
our @EXPORT_OK = ('solve'); | |
my $D = 192; |
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
package VillainZamagawa; | |
use strict; | |
use warnings; | |
use Exporter qw(import); | |
our @EXPORT_OK = qw(solve); | |
sub end ($) { | |
my ($h, $m) = $_[0] =~ /^(\d\d)(\d\d)$/; | |
return sprintf '%02d%02d', $h + 1, $m; | |
} |
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
use strict; | |
use warnings; | |
use List::Util qw(sum); | |
my @xs = (3, 3, 3); | |
my @ys = (2, 4); | |
my @diags = ( | |
[5, 4, 3], | |
[6, 7, 5], | |
); |
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
use strict; | |
use warnings; | |
use Exporter qw(import); | |
our @EXPORT = qw(solve); | |
my $cheet = <<__CHEET__; | |
0 1_12345 1_1 | |
1 30_32451 3_30 | |
2 1_12345|2_12345 1_1:2 | |
3 3_12345|2_12345|1_12345 1_1:2: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
package Senbatu; | |
use strict; | |
use warnings; | |
use Exporter qw(import); | |
our @EXPORT_OK = qw(solve); | |
sub nat () { | |
my $n = 1; | |
sub { $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
package Solver; | |
use strict; | |
use warnings; | |
no warnings 'experimental'; | |
use feature qw(signatures postderef); | |
use Exporter qw(import); | |
use List::MoreUtils qw(all); | |
our @EXPORT_OK = qw(solve); | |
my $board = <<__BOARD__; |
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
package PerlOnRails; | |
use strict; | |
use warnings; | |
use Exporter qw(import); | |
use Storable qw(dclone); | |
use List::MoreUtils qw(any uniq); | |
our @EXPORT_OK = qw(solve); | |
my %map = ( |
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
module Main (main) where | |
import Control.Applicative | |
class Functor f => LaxMonoidalWithStrength f where | |
unit :: () -> f () | |
phi :: (f a, f b) -> f (a, b) | |
st :: (a, f b) -> f (a, b) | |
{- |
OlderNewer