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
# -*- coding: utf-8 -*- | |
import re | |
def find_greedy(plans): | |
if len(plans)==0: return [] | |
plans.sort(key=lambda x: x[3]) # 終了時間でソート | |
next_plan = plans[0] # (残った中で)一番早く終わるチケットを選択 | |
result = [next_plan] |
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
"use strict"; | |
/* | |
PlayerName="permil" | |
【感想・作戦・工夫した点など】 | |
勝率が下がる一方なので諦めて戻しました・・・(~_~;) | |
調整の可能性があるためコピペが多いままですがご容赦ください。 | |
基本ロジックは過去の戦歴から統計を取り、直近数手と同じ進行が過去にあった場合には、 | |
「相手がその次に出していた手に勝てそうな手」を出す、です。 |
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
eval(q="a='';q='eval(q=%p.split | |
* %p)'%[q,a];c=-1;('%b'%'wa u | |
m 9l enj gzg 3 3y f0ueor ru n | |
t wf bk of oc 5z9v kn8s4l 7 | |
j im7 '. to_i( 3 6 )) .c h | |
a rs{|s |a+=s =='1' ? q [c += 1 | |
] :32.ch r} ;0.up t o (7 ){ | | |
o|puts(a[o*31,31])};".split*"") |
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
fn main() { | |
let prog = ">+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++ | |
++>-]<.>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]> | |
++++++++[<++++>-]<+.[-]++++++++++."; | |
let mut inst = 0; | |
let mut tape = [0; 30000]; | |
let mut ptr = 0; | |
while inst < prog.len() { |
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
prog = ">+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]<.>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[<++++>-]<+.[-]++++++++++." | |
p_ptr = 1 | |
tape = {} | |
ptr = 0 | |
insts = { | |
['>'] = function() ptr = ptr + 1 end, | |
['<'] = function() ptr = ptr - 1 end, | |
['+'] = function() if tape[ptr] == nil then tape[ptr] = 1 else tape[ptr] = tape[ptr] + 1 end end, |
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
extern crate rand; | |
use std::thread; | |
use std::time::Duration; | |
use rand::Rng; | |
struct Field { | |
width: usize, | |
height: usize, | |
grids: Vec<Vec<bool>> |
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
K(S(SI | |
(K(SS(SS(S(SSS)(SS(SS(SS)(SS(KI))))))(S(KS)K)))) | |
(K(S(SI | |
(K(SS(S(SS(KI))(SS(SS(SS)(SS(KI)))))(S(KS)K)))) | |
(K(S(SI | |
(K(SS(SS(SS(SS(S(SSS)(SS(SS(SS)(SS(KI))))))))(S(KS)K)))) | |
(K(S(SI | |
(K(SS(S(SI(SS(SS(KI))))(SS(S(SSS))(SS(KI))))(S(KS)K)))) | |
(K(S(SI | |
(K(S(SI(SS(SSI(SS(KI)))))(SS(S(SSS)(SSI(SS(KI)))))(S(KS)K)))) |
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
p ; e | |
@ / * 1 | |
; r ; m ; | |
0 $ l ; | |
i ; / |
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
<?xml version="1.0" encoding="utf-8" standalone="yes"?> | |
<InputMethod Version="1"> | |
<Version>1</Version> | |
<Name>Dvorak_Left_JP</Name> | |
<Author>August Dvorak</Author> | |
<Language>ja-JP</Language> | |
<Memo>左手用Dvorak配列</Memo> | |
<Weight Language="ja-JP">1.0</Weight> | |
<Signature>07B46AF590BDD9AD1A85660B5A2E8FEFDEB9D26E9DA0FF4C1E818CA34E7B1180BE42FC26213A0A92195BACA9F4EA95F6B5B46AF8BF4124914D2F8362D6CA9AA98F89A64F7B5A5A3D4CE120EE3A10BF619A07D27841238691D364CB363B7E07BF6444203E6A69CA5F9B3942EDDB311542F0943648F4FB415DBA67338FB5ADE6EA</Signature> | |
<KeyFilter> |
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
use v6; | |
class Brainfuck { | |
method run($prog) { | |
my @prog = $prog.comb(/./); | |
my $p_ptr = 0; | |
my @tape = (); | |
my $ptr = 0; | |
while @prog[$p_ptr] -> $char { |
OlderNewer