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; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ABC009 | |
{ | |
static class ProblemD | |
{ | |
public static void Main(string[] args) | |
{ |
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
1 2 3 4 5 6 7 8 | |
|-| |-| | | |-| | |
| | | | | |-| | | |
| | | | | | |-| | |
|-| | |-| | | | | |
| | |-| |-| |-| | |
|-| | |-| | | | | |
| |-| | |-| |-| | |
|-| |-| | | | | | |
| | | | |-| | | |
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
def read_problem(io) | |
problem = '' | |
loop { | |
ch = io.getc | |
break if !ch || ch == '?' | |
problem << ch | |
} | |
io.getc | |
problem | |
end |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>あぁ^〜心がぴょんぴょんするんじゃぁ^〜</title> | |
<script src="gochiusa.js"></script> | |
</head> | |
<body> | |
<canvas id="gochiusa" width="640" height="480"> | |
あぁ^〜心ぴょんぴょんするには最新のブラウザが必要なんじゃぁ^〜 |
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
#pyonpyon-container { | |
position: relative; | |
width: 100px; | |
height: 120px; | |
} | |
#kokoro { | |
position: absolute; | |
left: 0; | |
top: 0; |
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
let slice n arr = | |
let len = int (ceil ((float (Array.length arr)) / (float n))) | |
Array.init len (fun i -> arr.[(i * n)..(i * n + (n - 1))]) | |
// test code | |
[<EntryPoint>] | |
let main args = | |
let arr = [|1; 2; 3; 10; 20; 30; 100; 200; 300|] | |
let result = slice 3 arr | |
printfn "%A" result |
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
// https://paiza.jp/poh/enkoi-second/e144f4da | |
open System | |
let readLines (reader : IO.TextReader) = | |
seq { | |
let eof = ref false | |
while not !eof do | |
match reader.ReadLine() with | |
| null -> eof := true | |
| str -> yield str |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Affinity Propagation clustering</title> | |
<script src="./jquery-2.1.3.min.js"></script> | |
<script> | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} |
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
// * Add reference to iTunesLib to your project. | |
// * If iTunes isn't running when this code run, iTunes will start. | |
// * After this code run, iTunes will ask you that "are you sure to exit?" when you close iTunes because this code cannot release COM interface. Releasing code is no effects... | |
using System; | |
using iTunesLib; | |
iTunesApp app = new iTunesApp(); | |
IITTrack track = app.CurrentTrack; | |
if (track != null) |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace SimulationPhys2_5 | |
{ | |
/// <summary> | |
/// Represents a linear cellular automaton. | |
/// </summary> |
OlderNewer